diff --git a/extra/build.conf.sample b/extra/build.conf.sample index 6c1af17..63c7acf 100644 --- a/extra/build.conf.sample +++ b/extra/build.conf.sample @@ -74,6 +74,22 @@ LOGFILE="${BASEDIR}/logs/$(date +%s)" # What should the regular username be? (Automatically logged in on boot) REGUSR="${UXNAME}" +# Should the REGUSR have a password? IF THIS IS NOT SET, THE PASSWORD WILL BE BLANK! +# Do NOT use a plaintext password here. You will need to generate a salted and hashed string +# in a shadow-compatible format. +# Debian can do this with the mkpasswd utility (it's in Arch's AUR as debian-whois-mkpasswd): +# mkpasswd --method=sha-512 --salt=aBcDeFgHiJ PASSWORD +# (If a salt is not provided, one will be automatically generated. That is is the suggested method.) +# Or perl: +# perl -e 'print crypt("PASSWORD","\$6\$aBcDeFgHiJ\$") . "\n"' +# Or python: +# python -c "import crypt, getpass, pwd; print crypt.crypt('PASSWORD', '\$6\$aBcDeFgHiJ\$')" +# Or grub-crypt, even: +# /sbin/grub-crypt --sha-512 +# The end-product should look something like this: +# $6$aBcDeFgHiJ$Yh342vFH7MOjPNu9InFymD1Dd42i5cFsr1cTWdpKGNIkbRGR/ZKQDRPJ1ZeeGb7y894Tfh3iWZIJKu3phlsqQ1 +REGUSR_PASS="" + # Do we have enough horsepower on the build system to jack up the resources we throw at building? # Enabling this will give absolute CPU preference to building the kernels and do make-time # enhancements/optimizations (i.e. use the maximum number of CPU cores detected). diff --git a/lib/07-will_it_blend.func.sh b/lib/07-will_it_blend.func.sh index c0d893f..1cc30e6 100644 --- a/lib/07-will_it_blend.func.sh +++ b/lib/07-will_it_blend.func.sh @@ -24,7 +24,7 @@ function will_it_blend () { if [[ "${I_AM_A_RACECAR}" == "y" ]]; then - RACECAR_CHK='nice -n "-19" ' + RACECAR_CHK='nice -n -19 ' else RACECAR_CHK="" fi diff --git a/lib/08-stuffy.func.sh b/lib/08-stuffy.func.sh index ff33b43..3bdd896 100644 --- a/lib/08-stuffy.func.sh +++ b/lib/08-stuffy.func.sh @@ -4,7 +4,7 @@ function stuffy { if [[ "${I_AM_A_RACECAR}" == "y" ]]; then - RACECAR_CHK='nice -n "-19" ' + RACECAR_CHK='nice -n -19 ' else RACECAR_CHK="" fi diff --git a/lib/09-yo_dj.func.sh b/lib/09-yo_dj.func.sh index 0295ba6..749ce83 100644 --- a/lib/09-yo_dj.func.sh +++ b/lib/09-yo_dj.func.sh @@ -12,7 +12,7 @@ function yo_dj () { if [[ "${I_AM_A_RACECAR}" == "y" ]]; then - RACECAR_CHK='nice -n "-19" ' + RACECAR_CHK='nice -n -19 ' else RACECAR_CHK="" fi diff --git a/lib/10-mentos.func.sh b/lib/10-mentos.func.sh index f5f47b5..13a9d30 100644 --- a/lib/10-mentos.func.sh +++ b/lib/10-mentos.func.sh @@ -14,7 +14,7 @@ function mentos { if [[ "${I_AM_A_RACECAR}" == "y" ]]; then - RACECAR_CHK='nice -n "-19" ' + RACECAR_CHK='nice -n -19 ' else RACECAR_CHK="" fi diff --git a/lib/mk.chroot.sh b/lib/mk.chroot.sh index 5a5f738..19978ed 100755 --- a/lib/mk.chroot.sh +++ b/lib/mk.chroot.sh @@ -196,6 +196,7 @@ EOF set +e ${CHROOTCMD} ${i}/ bash -c "yaourt -S --needed --noconfirm linux" >> "${LOGFILE}.${FUNCNAME}" 2>&1 set -e + #${CHROOTCMD} ${i}/ bash -c "yaourt -S --needed --noconfirm debian-whois-mkpasswd" >> "${LOGFILE}.${FUNCNAME}" 2>&1 for x in $(find ${i}/etc/ -type f -iname "*.pacorig");do mv -f ${x} ${x%%.pacorig} ; done echo -n "Regular packages..." set +e @@ -208,6 +209,10 @@ EOF ${CHROOTCMD} ${i}/ passwd -d ${REGUSR} >> "${LOGFILE}.${FUNCNAME}" 2>&1 mkdir -p ${i}/etc/sudoers.d ; chmod 750 ${i}/etc/sudoers.d echo "${REGUSR} ALL=(ALL) ALL" >> ${i}/etc/sudoers.d/${REGUSR} + if [ -n "${REGUSR_PASS}" ]; + then + ${CHROOTCMD} ${i}/ echo "${REGUSR}:${REGUSR_PASS}" | chpasswd -e + fi echo "Done." done