X-Git-Url: https://git.grml.org/?p=grml-debootstrap.git;a=blobdiff_plain;f=chroot-script;h=5ca8295500bbffc85d89d8d18b7e613a94a0aba2;hp=8f545cf4eb6e01c3890e4e8d898cab61f42a1e2d;hb=444d8dfca8c5fe66bad93e8e74d7d2eb4777712e;hpb=17576f28917f7708e17d5add6497eb0efbbd4b59 diff --git a/chroot-script b/chroot-script index 8f545cf..5ca8295 100755 --- a/chroot-script +++ b/chroot-script @@ -196,7 +196,8 @@ kernel() { if [ "$RELEASE" = 'sarge' ] ; then KERNELPACKAGES="kernel-image-$KERNEL kernel-headers-$KERNEL" else - KERNELPACKAGES="linux-image-$KERNEL linux-headers-$KERNEL" + # note: install busybox to be able to debug initramfs + KERNELPACKAGES="linux-image-$KERNEL linux-headers-$KERNEL busybox" fi DEBIAN_FRONTEND=$DEBIAN_FRONTEND $APTINSTALL $KERNELPACKAGES fi @@ -221,8 +222,14 @@ passwords() echo "Activating shadow passwords." shadowconfig on + CHPASSWD_OPTION= + if chpasswd --help 2>&1 | grep -q -- '-m,' ; then + CHPASSWD_OPTION='-m' + fi + + if [ -n "$ROOTPASSWORD" ] ; then - echo root:"$ROOTPASSWORD" | chpasswd -m + echo root:"$ROOTPASSWORD" | chpasswd $CHPASSWD_OPTION export ROOTPASSWORD='' else a='1' @@ -240,7 +247,7 @@ passwords() a='1' b='2' else - echo root:"$a" | chpasswd -m + echo root:"$a" | chpasswd $CHPASSWD_OPTION unset a unset b fi