X-Git-Url: https://iankelling.org/git/?p=automated-distro-installer;a=blobdiff_plain;f=fai%2Fconfig%2Fhooks%2Finstsoft.DEBIAN;h=ebf7d8ac9ef28831efb4fbda4bd2793ddd884625;hp=c503a047d76a9f47514d5ca3f1910b06a513308f;hb=056eb4e90e13b2d8f7cbb8c3b875f35bf0fa207e;hpb=a6f3eaed0a1eebb5c58853fb9faa8bfbec404de3 diff --git a/fai/config/hooks/instsoft.DEBIAN b/fai/config/hooks/instsoft.DEBIAN index c503a04..ebf7d8a 100755 --- a/fai/config/hooks/instsoft.DEBIAN +++ b/fai/config/hooks/instsoft.DEBIAN @@ -2,15 +2,25 @@ # 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