X-Git-Url: https://git.grml.org/?p=grml-debootstrap.git;a=blobdiff_plain;f=grml-debootstrap;h=104f454515a89a9c7d73eed1cb993db7468a8d56;hp=4554d46eeef45d8703506151ad0e156267884948;hb=bedb4090c2608ad8f9fe94e6f2b032c8f438b82c;hpb=91f2e990ca65aa3670454097d6d3937d392d7652 diff --git a/grml-debootstrap b/grml-debootstrap index 4554d46..104f454 100755 --- a/grml-debootstrap +++ b/grml-debootstrap @@ -84,6 +84,7 @@ MNTPOINT="/mnt/debootstrap.$$" # inside the chroot system locales might not be available, so use minimum: export LANG=C export LC_ALL=C +export LANGUAGE=C # make sure interactive mode is only executed when # using an empty configuration file or option --interactive @@ -1406,17 +1407,21 @@ iface eth0 inet dhcp # execute all scripts in /etc/debootstrap/pre-scripts/ {{{ execute_pre_scripts() { - # make sure we have $MNTPOINT available for our scripts - export MNTPOINT - if [ -d "$_opt_pre_scripts" ] || [ "$PRE_SCRIPTS" = 'yes' ] ; then - [ -d "$_opt_pre_scripts" ] && pre_scripts="$_opt_pre_scripts" || pre_scripts="$CONFFILES/pre-scripts/" - for script in ${pre_scripts}/* ; do - if [ -x "$script" ] ; then - einfo "Executing pre-script $script" - $script ; eend $? - fi - done - fi + # make sure hostname is set even before chroot-script get executed + echo "$HOSTNAME" > /etc/hostname + + # make sure we have $MNTPOINT available for our scripts + export MNTPOINT + + if [ -d "$_opt_pre_scripts" ] || [ "$PRE_SCRIPTS" = 'yes' ] ; then + [ -d "$_opt_pre_scripts" ] && pre_scripts="$_opt_pre_scripts" || pre_scripts="${CONFFILES}/pre-scripts/" + for script in "${pre_scripts}"/* ; do + if [ -x "$script" ] ; then + einfo "Executing pre-script $script" + "$script" ; eend $? + fi + done + fi } # }}}