X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=prep.sh;h=1723a2c0c516ea2d580b056a2def667917c3a06a;hb=769e092954710140014dc3c9652b4c414cfbba5f;hp=4b851de3ff8aa661c165daf9b2b6448005f5a16a;hpb=1d27d76a69c0a26d85750e367d01e3a87be97295;p=bootcd.git diff --git a/prep.sh b/prep.sh index 4b851de..1723a2c 100755 --- a/prep.sh +++ b/prep.sh @@ -51,6 +51,7 @@ pl_root_mkfedora $bootcd $pldistro $pkgsfile pl_root_tune_image $bootcd # Add site_admin console account to BootCD: with root priv, and self passwd +echo "* Creating site_admin account" CRYPT_SA_PASSWORD=$(python3 -c "import crypt, random, string; salt = [random.choice(string.ascii_letters + string.digits + \"./\") for i in range(0,8)] ; print(crypt.crypt('site_admin', '\$1\$' + \"\".join(salt) + '\$'))") chroot ${bootcd} /usr/sbin/useradd -p "$CRYPT_SA_PASSWORD" -o -g 0 -u 0 -m site_admin @@ -128,7 +129,7 @@ install -d -m 755 $isofs # Copy the kernel out echo "* BootCD - locating kernel" for kernel in $bootcd/boot/vmlinuz-* ; do - if [ -f $kernel ] ; then + if [ -f "$kernel" ] ; then echo "* BootCD kernel (1) creating from $kernel" echo "* kernel created (1) from $kernel" > $isofs/kernel.from install -D -m 644 $kernel $isofs/kernel @@ -160,7 +161,7 @@ done # second chance if first approach would not work if [ ! -f $isofs/kernel ] ; then kernel=$(find $bootcd/boot -name linux) - if [ -f $kernel ] ; then + if [ -f "$kernel" ] ; then echo "* BootCD kernel (2) creating from $kernel" echo "* kernel created (2) from $kernel" > $isofs/kernel.from install -D -m 644 $kernel $isofs/kernel