X-Git-Url: http://git.grml.org/?a=blobdiff_plain;ds=sidebyside;f=scripts%2Flive-bottom%2F25configure_init;h=d007556d36af89a4a3625c6769a38e563e222bd5;hb=86cb1930ec63c3554154d4f9eec36ad3d508ec7c;hp=b3f6ebf2855a9d91e9bdde54792a76f60d38f908;hpb=0a854a1e9307affdeaf96cb3ec0c864b171d66ca;p=live-boot-grml.git diff --git a/scripts/live-bottom/25configure_init b/scripts/live-bottom/25configure_init index b3f6ebf..d007556 100755 --- a/scripts/live-bottom/25configure_init +++ b/scripts/live-bottom/25configure_init @@ -1,27 +1,36 @@ #!/bin/sh -PREREQ="" -DESCRIPTION="Setting up init..." +#set -e -. /scripts/live-functions +# initramfs-tools header + +PREREQ="" prereqs() { - echo "$PREREQ" + echo "${PREREQ}" } -case $1 in -# get pre-requisites -prereqs) - prereqs - exit 0 - ;; +case "${1}" in + prereqs) + prereqs + exit 0 + ;; esac -log_begin_msg "$DESCRIPTION" +# live-initramfs header + +. /scripts/live-functions + +log_begin_msg "Setting up init..." + +# live-initramfs script # Arrange for shells on virtual consoles, rather than login prompts +if [ -z "${NOAUTOLOGIN}" ] +then + if [ -n "$USERNAME" ]; then if [ ! -z "${LIVE_GETTY}" ]; then if echo "${DEFCONSOLE}" | grep -qs ttyS; then @@ -57,8 +66,25 @@ if [ -n "$USERNAME" ]; then for f in /root/etc/event.d/tty*; do sed -i -e "s|^respawn.*|respawn /bin/login -f $USERNAME /dev/$(basename $f) 2>\&1|" $f done + + if [ "${BUILD_SYSTEM}" = "Ubuntu" ]; then + for x in $(cat /proc/cmdline); do + case $x in + noninteractive) + sed -i -e "s|^exec.*|exec /usr/bin/ubiquity noninteractive /dev/tty1 2>\&1|" /root/etc/event.d/tty1 + rm -f /root/etc/rc?.d/[SK]??gdm + rm -f /root/etc/rc?.d/[SK]??kdm + ;; + esac + done + fi fi fi + + # Since we use autologin, lastlog doesn't make sense on the console. + sed -i '/^[^#].*pam_lastlog\.so/s/^/# /' /root/etc/pam.d/login +fi + fi # This has the nice side effect of the cron.{daily,weekly,monthly} jobs in