X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=fai%2Fconfig%2Fhooks%2Finstsoft.DEBIAN;h=13c517a991ee6d73fa7edb7eed7c3ce6609a9739;hb=a2b8051e808621b9a33617d0c75d212bd2141ddc;hp=c503a047d76a9f47514d5ca3f1910b06a513308f;hpb=a6f3eaed0a1eebb5c58853fb9faa8bfbec404de3;p=automated-distro-installer diff --git a/fai/config/hooks/instsoft.DEBIAN b/fai/config/hooks/instsoft.DEBIAN index c503a04..13c517a 100755 --- a/fai/config/hooks/instsoft.DEBIAN +++ b/fai/config/hooks/instsoft.DEBIAN @@ -1,16 +1,27 @@ #! /bin/bash +set -x # if package locales will be installed, then install it early, before # other packages - -if [ $FAI_ACTION != "install" ]; then +if [ $FAI_ACTION != "install" -a $FAI_ACTION != "dirinstall" ]; then exit 0 fi fcopy -Bi /etc/apt/apt.conf.d/force_confdef -ainsl -av /etc/ucf.conf "^conf_force_conffold=YES" +ainsl -a /etc/ucf.conf "^conf_force_conffold=YES" + +# in case the locales are already included inside the base file (Ubuntu) +if [ -f $target/usr/sbin/locale-gen ]; then + $ROOTCMD dpkg-reconfigure -fnoninteractive locales + exit +fi +# if we want to install locales, install them now install_packages -l 2>/dev/null | egrep -q ' locales|locales ' if [ $? -eq 0 ]; then - $ROOTCMD apt-get -y install locales + if [ X$verbose = X1 ]; then + $ROOTCMD apt-get -y install locales + else + $ROOTCMD apt-get -y install locales > /dev/null + fi fi