diff options
| author | Daniel Baumann <daniel@debian.org> | 2010-05-24 15:27:36 +0200 |
|---|---|---|
| committer | Daniel Baumann <daniel@debian.org> | 2011-03-09 17:52:46 +0100 |
| commit | e66f79476042794195978ee641aa7ea0d9ca6e0a (patch) | |
| tree | 90286f281543c1a6f4ad56e229f5ff95438613da /scripts/live-bottom | |
| parent | ad7598cb46a5a6268ca60e5dba156056fb86c09d (diff) | |
| download | live-boot-e66f79476042794195978ee641aa7ea0d9ca6e0a.tar.gz live-boot-e66f79476042794195978ee641aa7ea0d9ca6e0a.zip | |
Adding debian version 2.0~a1-1.
Diffstat (limited to 'scripts/live-bottom')
35 files changed, 40 insertions, 1137 deletions
diff --git a/scripts/live-bottom/02etc_live_conf b/scripts/live-bottom/02etc_live_conf index 815e379..8309a15 100755 --- a/scripts/live-bottom/02etc_live_conf +++ b/scripts/live-bottom/02etc_live_conf @@ -18,13 +18,13 @@ case "${1}" in ;; esac -# live-initramfs header +# live-boot header . /scripts/live-functions log_begin_msg "Copying config on real root fs" -# live-initramfs script +# live-boot script if [ -f /etc/live.conf ] then diff --git a/scripts/live-bottom/02timezone b/scripts/live-bottom/02timezone deleted file mode 100755 index 64faf3b..0000000 --- a/scripts/live-bottom/02timezone +++ /dev/null @@ -1,60 +0,0 @@ -#!/bin/sh - -#set -e - -# initramfs-tools header - -PREREQ="" - -prereqs() -{ - echo "${PREREQ}" -} - -case "${1}" in - prereqs) - prereqs - exit 0 - ;; -esac - -# live-initramfs header - -if [ -n "${NOTIMEZONE}" ] -then - exit 0 -fi - -. /scripts/live-functions - -log_begin_msg "Setting timezone" - -# live-initramfs script - -if [ -n "${TIMEZONE}" ] -then - area="$(echo ${TIMEZONE} | cut -f1 -d '/')" - zone="$(echo ${TIMEZONE} | cut -f2 -d '/')" - -chroot /root debconf-communicate -fnoninteractive live-initramfs > /dev/null << EOF -set tzdata/Areas ${area} -set tzdata/Zones/${area} ${zone} -EOF - - cp -f /root/usr/share/zoneinfo/${area}/${zone} /root/etc/localtime -else - -chroot /root debconf-communicate -fnoninteractive live-initramfs > /dev/null << EOF -set tzdata/Areas Etc -set tzdata/Zones/Etc UTC -EOF - - cp -f /root/usr/share/zoneinfo/UTC /root/etc/localtime -fi - -if [ -n "${UTC}" ] -then - sed -i -e "s/UTC=.*/UTC=${UTC}/" /root/etc/default/rcS -fi - -log_end_msg diff --git a/scripts/live-bottom/05mountpoints b/scripts/live-bottom/05mountpoints deleted file mode 100755 index ce151e1..0000000 --- a/scripts/live-bottom/05mountpoints +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/sh - -#set -e - -# initramfs-tools header - -PREREQ="" - -prereqs() -{ - echo "${PREREQ}" -} - -case "${1}" in - prereqs) - prereqs - exit 0 - ;; -esac - -# live-initramfs header - -. /scripts/live-functions - -log_begin_msg "Moving mount points" - -# live-initramfs script - -# Move to the new root filesystem so that programs there can get at it. -if [ ! -d /root/live/image ] -then - mkdir -p /root/live/image - mount --move /live/image /root/live/image -fi - -log_end_msg diff --git a/scripts/live-bottom/06hostname b/scripts/live-bottom/06hostname deleted file mode 100755 index b14703a..0000000 --- a/scripts/live-bottom/06hostname +++ /dev/null @@ -1,62 +0,0 @@ -#!/bin/sh - -#set -e - -# initramfs-tools header - -PREREQ="" - -prereqs() -{ - echo "${PREREQ}" -} - -case "${1}" in - prereqs) - prereqs - exit 0 - ;; -esac - -# live-initramfs header - -if [ -n "${NOHOSTS}" ] -then - exit 0 -fi - -. /scripts/live-functions - -log_begin_msg "Setting hostname" - -# live-initramfs script - -# Change hostname only if it is not set -if [ ! -f /root/etc/hostname ] || grep -qs localhost\.localdomain /root/etc/hostname -then - echo "${HOSTNAME}" > /root/etc/hostname -else - HOSTNAME="$(cat /root/etc/hostname)" - really_export HOSTNAME -fi - -# Create /etc/hosts only if it is not present or empty -if [ ! -s /root/etc/hosts ] -then - cat > /root/etc/hosts << EOF -127.0.0.1 localhost -127.0.1.1 ${HOSTNAME} - -# The following lines are desirable for IPv6 capable hosts -::1 ip6-localhost ip6-loopback -fe00::0 ip6-localnet -ff00::0 ip6-mcastprefix -ff02::1 ip6-allnodes -ff02::2 ip6-allrouters -ff02::3 ip6-allhosts -EOF -fi - -hostname "${HOSTNAME}" - -log_end_msg diff --git a/scripts/live-bottom/08persistence_excludes b/scripts/live-bottom/08persistence_excludes index b7aac92..43639f9 100755 --- a/scripts/live-bottom/08persistence_excludes +++ b/scripts/live-bottom/08persistence_excludes @@ -24,7 +24,7 @@ case "${1}" in ;; esac -# live-initramfs header +# live-boot header if [ -z "${PERSISTENT}" ] || [ -n "${NOPERSISTENT}" ] || [ -z "${PERSISTENCE_IS_ON}" ] || [ ! -f /root/etc/live-persistence.binds ] then @@ -33,7 +33,7 @@ fi . /scripts/live-functions -# live-initramfs script +# live-boot script dirs="$(sed -e '/^ *$/d' -e '/^#.*$/d' /root/etc/live-persistence.binds | tr '\n' '\0')" if [ -z "${dirs}" ] diff --git a/scripts/live-bottom/10adduser b/scripts/live-bottom/10adduser deleted file mode 100755 index 51868d4..0000000 --- a/scripts/live-bottom/10adduser +++ /dev/null @@ -1,127 +0,0 @@ -#!/bin/sh - -#set -e - -# initramfs-tools header - -PREREQ="" - -prereqs() -{ - echo "${PREREQ}" -} - -case "${1}" in - prereqs) - prereqs - exit 0 - ;; -esac - -# live-initramfs header - -if [ -n "${NOUSER}" ] -then - exit 0 -fi - -. /scripts/live-functions -load_confmodule - -log_begin_msg "Adding live session user" - -# live-initramfs script - -user_crypted="8Ab05sVQ4LLps" # as in $(echo "live" | mkpasswd -s) - -# U6aMy0wojraho is just a blank password -db_set passwd/make-user true -db_set passwd/root-password-crypted '*' -db_set passwd/user-password-crypted ${user_crypted} -db_set passwd/user-fullname "$USERFULLNAME" -db_set passwd/username "$USERNAME" -db_set passwd/user-uid 999 - -chroot /root /usr/bin/env -i HOME="/root" \ - TERM="${TERM}" PATH="/usr/sbin:/usr/bin:/sbin:/bin" \ - /usr/lib/user-setup/user-setup-apply 2>&1 \ - | grep -v "Shadow passwords are now on" - -# Clear out debconf database again to avoid confusing ubiquity later. -db_set passwd/make-user -db_set passwd/root-password-crypted -db_set passwd/user-password-crypted -db_set passwd/user-fullname -db_set passwd/username -db_set passwd/user-uid - -if ! grep -qs "${USERNAME}" /root/etc/passwd -then - echo "The default user (${USERNAME}) is not present," - first_user=$(grep '^[^:]*:[^:]*:[12]\?[0-9][0-9][0-9][0-9]:' /root/etc/passwd | head -1 | cut -f1 -d ':') - if [ -n "${first_user}" ]; - then - echo "setting default user to: ${first_user}." - USERNAME="${first_user}" - really_export USERNAME - else - echo "no other valid users found, disabling autologin." - NOAUTOLOGIN="Yes" - NOXAUTOLOGIN="Yes" - USERNAME="" - really_export NOAUTOLOGIN - really_export NOXAUTOLOGIN - really_export USERNAME - log_end_msg - exit 0 - fi -fi - -if [ -z "${NOSUDO}" ] -then - if ! grep -q "${USERNAME}" /root/etc/sudoers - then - echo "${USERNAME} ALL=(ALL) NOPASSWD: ALL" >> /root/etc/sudoers - - chroot /root sudo -u "${USERNAME}" sh -c "echo 'SU_TO_ROOT_SU=sudo' >> /home/${USERNAME}/.su-to-rootrc" - - if [ -x /root/usr/bin/gconftool-2 ] - then - chroot /root sudo -u "${USERNAME}" gconftool-2 -s -t bool /apps/gksu/sudo-mode true - chroot /root sudo -u "${USERNAME}" gconftool-2 -s -t bool /apps/gksu/display-no-pass-info false - fi - -chroot /root sudo -u "${USERNAME}" sh -c "umask 0077 && mkdir -p /home/${USERNAME}/.kde/share/config && cat > /home/${USERNAME}/.kde/share/config/kdesurc" << EOF -[super-user-command] -super-user-command=sudo -EOF - - if [ -f /root/usr/share/apps/konsole/sumc.desktop ] - then - chroot /root sudo -u "${USERNAME}" sh -c "umask 0077 && mkdir -p /home/${USERNAME}/.kde/share/apps/konsole && sed -e's/Exec=su.*$/Exec=sudo mc -c/' /usr/share/apps/konsole/sumc.desktop > /home/${USERNAME}/.kde/share/apps/konsole/sumc.desktop" - fi - - if [ -f /root/usr/share/apps/konsole/su.desktop ] - then - chroot /root sudo -u "${USERNAME}" sh -c "umask 0077 && mkdir -p /home/${USERNAME}/.kde/share/apps/konsole && sed -e's/Exec=su.*$/Exec=sudo -i/' /usr/share/apps/konsole/su.desktop > /home/${USERNAME}/.kde/share/apps/konsole/su.desktop" - fi - fi -fi - -if [ -L /root/home/${USERNAME}/Examples ] -then - chroot /root install -o ${USERNAME} -g ${USERNAME} -d /home/${USERNAME}/Desktop/ - mv /root/home/${USERNAME}/Examples /root/home/${USERNAME}/Desktop/ -fi - -if [ -f /root/home/$USERNAME/examples.desktop ]; then - chroot /root install -o $USERNAME -g $USERNAME -d /home/$USERNAME/Desktop/ - mv /root/home/$USERNAME/examples.desktop /root/home/$USERNAME/Desktop/ -fi - -if [ -e /root/usr/share/applications/live-installer-launcher.desktop ] -then - chroot /root install -D -o ${USERNAME} -g ${USERNAME} /usr/share/applications/live-installer-launcher.desktop /home/${USERNAME}/Desktop/live-installer-launcher.desktop -fi - -log_end_msg diff --git a/scripts/live-bottom/12fstab b/scripts/live-bottom/12fstab index cd78edf..31e1e72 100755 --- a/scripts/live-bottom/12fstab +++ b/scripts/live-bottom/12fstab @@ -19,7 +19,7 @@ case "${1}" in ;; esac -# live-initramfs header +# live-boot header . /scripts/live-functions @@ -30,7 +30,7 @@ fi log_begin_msg "Configuring fstab" -# live-initramfs script +# live-boot script # Create a fake fstab only if it doesn't exist or if its the debootstrap template if [ ! -f "${FSTAB}" ] || grep -qs 'UNCONFIGURED FSTAB FOR BASE SYSTEM' "${FSTAB}" diff --git a/scripts/live-bottom/14locales b/scripts/live-bottom/14locales index 022a605..e53e487 100755 --- a/scripts/live-bottom/14locales +++ b/scripts/live-bottom/14locales @@ -18,7 +18,7 @@ case "${1}" in ;; esac -# live-initramfs header +# live-boot header if [ -n "${NOLOCALES}" ] then @@ -32,7 +32,7 @@ log_begin_msg "Setting up locales" # Cosmetic line wrapping for output of local-gen echo -# live-initramfs script +# live-boot script if [ -e /root/etc/default/locale ] then diff --git a/scripts/live-bottom/15autologin b/scripts/live-bottom/15autologin deleted file mode 100755 index 12c937d..0000000 --- a/scripts/live-bottom/15autologin +++ /dev/null @@ -1,114 +0,0 @@ -#!/bin/sh - -#set -e - -# initramfs-tools header - -PREREQ="" - -prereqs() -{ - echo "${PREREQ}" -} - -case "${1}" in - prereqs) - prereqs - exit 0 - ;; -esac - -# live-initramfs header - -. /live.vars - -if [ -n "${NOXAUTOLOGIN}" ] || [ -z "${USERNAME}" ] -then - exit 0 -fi - -. /scripts/live-functions - -log_begin_msg "Setting up automatic login" - -# live-initramfs script - -# chroot needed to handle symlinks correctly -if chroot /root [ -f /etc/gdm/gdm-cdd.conf ] -then - GDMCONF=/etc/gdm/gdm-cdd.conf -else - GDMCONF=/etc/gdm/gdm.conf -fi - -# chroot needed to handle symlinks correctly -if chroot /root [ -f ${GDMCONF} ] -then - # true hack ! -- nohar - chroot /root cp /usr/share/gdm/defaults.conf /etc/gdm/gdm.conf - - # Configure GDM autologin - chroot /root \ - sed -i -e "s/^AutomaticLoginEnable=.*\$/AutomaticLoginEnable=true/" \ - -e "s/^AutomaticLogin=.*\$/AutomaticLogin=${USERNAME}/" \ - -e "s/^TimedLoginEnable=.*\$/TimedLoginEnable=true/" \ - -e "s/^TimedLogin=.*\$/TimedLogin=${USERNAME}/" \ - -e "s/^TimedLoginDelay=.*\$/TimedLoginDelay=10/" \ - ${GDMCONF} -elif [ -d /root/etc/gdm3 ] -then - GDMCustomFile=/root/etc/gdm3/custom.conf - AutologinParameters="AutomaticLoginEnable=true\n\ -AutomaticLogin=$USERNAME\n\ -TimedLoginEnable=true\n\ -TimedLogin=$USERNAME\n\ -TimedLoginDelay=10" - - # Prevent from updating if parameters already present (persistent usb - # key) - if ! $(grep -qs '\[daemon\]' $GDMCustomFile) - then - echo '[daemon]' >> $GDMCustomFile - fi - - sed -i "s/\[daemon\]/\[daemon\]\n$AutologinParameters/" $GDMCustomFile -fi - -if [ -d /root/etc/default/kdm.d/ ] -then - if ! grep -qs "^AUTOLOGIN" /root/etc/default/kdm.d/live-autologin - then - -cat >> /root/etc/default/kdm.d/live-autologin << EOF -AUTOLOGINUSER=${USERNAME} -AUTOLOGINAGAIN=true -AUTOLOGINDELAY=0 -EOF - - fi - -elif [ -f /root/etc/kde3/kdm/kdmrc ] -then - # Configure KDM autologin - sed -i -r -e "s/^#?AutoLoginEnable=.*\$/AutoLoginEnable=true/" \ - -e "s/^#?AutoLoginUser=.*\$/AutoLoginUser=${USERNAME}/" \ - -e "s/^#?AutoReLogin=.*\$/AutoReLogin=true/" \ - /root/etc/kde3/kdm/kdmrc -elif [ -f /root/etc/kde4/kdm/kdmrc ] -then - # Configure KDM-KDE4 autologin - sed -i -r -e "s/^#?AutoLoginEnable=.*\$/AutoLoginEnable=true/" \ - -e "s/^#?AutoLoginUser=.*\$/AutoLoginUser=$USERNAME/" \ - -e "s/^#?AutoReLogin=.*\$/AutoReLogin=true/" \ - /root/etc/kde4/kdm/kdmrc -fi - -if [ -f /root/etc/lxdm/lxdm.conf ] -then - # Configure LXDM autologin - sed -i -r -e "s/^# autologin=dgod/autologin=$USERNAME/" \ - -e "s/^# session/session/" \ - /root/etc/lxdm/lxdm.conf -fi - -log_end_msg diff --git a/scripts/live-bottom/16umountfs b/scripts/live-bottom/16umountfs index 64ad99d..055c3f6 100755 --- a/scripts/live-bottom/16umountfs +++ b/scripts/live-bottom/16umountfs @@ -18,7 +18,7 @@ case "${1}" in ;; esac -# live-initramfs header +# live-boot header . /live.vars @@ -26,7 +26,7 @@ esac log_begin_msg "Disabling umountfs for live specific filesystems" -# live-initramfs script +# live-boot script if [ -e /root/etc/init.d/umountfs ] then diff --git a/scripts/live-bottom/19keyboard b/scripts/live-bottom/19keyboard index f903f2b..5a262fa 100755 --- a/scripts/live-bottom/19keyboard +++ b/scripts/live-bottom/19keyboard @@ -18,7 +18,7 @@ case "${1}" in ;; esac -# live-initramfs header +# live-boot header if [ -n "${NOCONSOLEKEYBOARD}" ] then @@ -29,7 +29,7 @@ fi log_begin_msg "Setting up console keyboard" -# live-initramfs script +# live-boot script kbd= cslayout= diff --git a/scripts/live-bottom/20xconfig b/scripts/live-bottom/20xconfig index e2839b2..abd9661 100755 --- a/scripts/live-bottom/20xconfig +++ b/scripts/live-bottom/20xconfig @@ -18,7 +18,7 @@ case "${1}" in ;; esac -# live-initramfs header +# live-boot header if [ -n "${NOXAUTOCONFIG}" ] then @@ -27,7 +27,7 @@ fi . /scripts/live-functions -# live-initramfs script +# live-boot script if [ -n "${TEXTONLY}" ] then @@ -83,7 +83,7 @@ then setlayout="set xserver-xorg/config/inputdevice/keyboard/layout ${KLAYOUT}" fi -chroot /root debconf-communicate -fnoninteractive live-initramfs > /dev/null << EOF +chroot /root debconf-communicate -fnoninteractive live-boot > /dev/null << EOF ${setlayout} ${setvariant} ${setmodel} diff --git a/scripts/live-bottom/21xdriver b/scripts/live-bottom/21xdriver index e86c310..92bbd4f 100755 --- a/scripts/live-bottom/21xdriver +++ b/scripts/live-bottom/21xdriver @@ -18,7 +18,7 @@ case "${1}" in ;; esac -# live-initramfs header +# live-boot header if [ -n "${NOXAUTOCONFIG}" ] || [ ! -x /root/usr/bin/X ] || [ -z "${XDRIVER}" ] then @@ -29,7 +29,7 @@ fi log_begin_msg "Configuring X video driver" -# live-initramfs script +# live-boot script . /live.vars @@ -40,7 +40,7 @@ mount -o bind /dev /root/dev if [ "${XDRIVER}" != "dexconf" ] then -chroot /root debconf-communicate -fnoninteractive live-initramfs > /dev/null << EOF +chroot /root debconf-communicate -fnoninteractive live-boot > /dev/null << EOF set xserver-xorg/autodetect_video_card false set xserver-xorg/config/device/driver ${XDRIVER} EOF diff --git a/scripts/live-bottom/21xvidemode b/scripts/live-bottom/21xvidemode index 3fb9190..ac28fad 100755 --- a/scripts/live-bottom/21xvidemode +++ b/scripts/live-bottom/21xvidemode @@ -18,7 +18,7 @@ case "${1}" in ;; esac -# live-initramfs header +# live-boot header if [ -n "${NOXAUTOCONFIG}" ] then @@ -36,7 +36,7 @@ fi log_begin_msg "Configuring X video modes" -# live-initramfs script +# live-boot script . /live.vars diff --git a/scripts/live-bottom/22gnome_panel_data b/scripts/live-bottom/22gnome_panel_data deleted file mode 100755 index 09449e2..0000000 --- a/scripts/live-bottom/22gnome_panel_data +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh - -#set -e - -# initramfs-tools header - -PREREQ="" - -prereqs() -{ - echo "${PREREQ}" -} - -case "${1}" in - prereqs) - prereqs - exit 0 - ;; -esac - -# live-initramfs header - -if [ ! -e /root/var/lib/dpkg/info/gnome-panel-data.list ] || [ -n "${NOGNOMEPANEL}" ] -then - exit 0 -fi - -. /scripts/live-functions - -log_begin_msg "Configuring gnome-panel-data" - -# live-initramfs script - -if [ -n "${USERNAME}" ] -then - chroot /root sudo -u "${USERNAME}" gconftool-2 -s -t bool /apps/panel/global/disable_lock_screen true -fi - -log_end_msg diff --git a/scripts/live-bottom/22screensaver b/scripts/live-bottom/22screensaver deleted file mode 100755 index 584d234..0000000 --- a/scripts/live-bottom/22screensaver +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/sh - -#set -e - -# initramfs-tools header - -PREREQ="" - -prereqs() -{ - echo "${PREREQ}" -} - -case "${1}" in - prereqs) - prereqs - exit 0 - ;; -esac - -# live-initramfs header - -if [ -n "${NOXSCREENSAVER}" ] -then - exit 0 -fi - -. /scripts/live-functions - -log_begin_msg "Configuring screensaver" - -# live-initramfs script - -gnome_screensaver_version=$(chroot /root dpkg-query -W --showformat='${Version}' gnome-screensaver 2>/dev/null) || gnome_screensaver_version="" - -if [ -n "${gnome_screensaver_version}" ] -then - # Support legacy gconf value - chroot /root sudo -u "${USERNAME}" gconftool-2 -t bool -s /apps/gnome-screensaver/lock false - chroot /root sudo -u "${USERNAME}" gconftool-2 -t bool -s /apps/gnome-screensaver/lock_enabled false -fi - -log_end_msg diff --git a/scripts/live-bottom/22serialtty b/scripts/live-bottom/22serialtty index a8008eb..ee9ddb1 100755 --- a/scripts/live-bottom/22serialtty +++ b/scripts/live-bottom/22serialtty @@ -18,7 +18,7 @@ case "${1}" in ;; esac -# live-initramfs header +# live-boot header # this bottom script currently only works with upstart if [ ! -d /root/etc/init ] @@ -28,7 +28,7 @@ fi . /scripts/live-functions -# live-initramfs script +# live-boot script for ARGUMENT in $(cat /proc/cmdline) do diff --git a/scripts/live-bottom/22sslcert b/scripts/live-bottom/22sslcert deleted file mode 100755 index d54dc29..0000000 --- a/scripts/live-bottom/22sslcert +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh - -#set -e - -# initramfs-tools header - -PREREQ="" - -prereqs() -{ - echo "${PREREQ}" -} - -case "${1}" in - prereqs) - prereqs - exit 0 - ;; -esac - -# live-initramfs header - -. /scripts/live-functions -load_confmodule - -log_begin_msg "Regenerating SSL certificate..." - -# live-initramfs script - -if [ -x /root/usr/sbin/make-ssl-cert ] -then - chroot /root /usr/sbin/make-ssl-cert generate-default-snakeoil --force-overwrite -fi - -log_end_msg diff --git a/scripts/live-bottom/23etc_modules b/scripts/live-bottom/23etc_modules deleted file mode 100755 index 2240a1b..0000000 --- a/scripts/live-bottom/23etc_modules +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/sh - -#set -e - -# initramfs-tools header - -PREREQ="" - -prereqs() -{ - echo "${PREREQ}" -} - -case "${1}" in - prereqs) - prereqs - exit 0 - ;; -esac - -# live-initramfs header - -. /scripts/live-functions - -log_begin_msg "Preconfiguring /etc/modules" - -# live-initramfs script - -# load the right modules -case "${DPKG_ARCH}" in - powerpc|ppc64) - echo snd_powermac >> /root/etc/modules - ;; -esac - -log_end_msg diff --git a/scripts/live-bottom/23networking b/scripts/live-bottom/23networking index 4ebb944..d73f63b 100755 --- a/scripts/live-bottom/23networking +++ b/scripts/live-bottom/23networking @@ -18,7 +18,7 @@ case "${1}" in ;; esac -# live-initramfs header +# live-boot header if [ -n "${NONETWORKING}" ] then @@ -29,7 +29,7 @@ fi log_begin_msg "Preconfiguring networking" -# live-initramfs script +# live-boot script IFFILE="/root/etc/network/interfaces" @@ -119,7 +119,7 @@ EOF cat > /root/etc/resolv.conf << EOF # /etc/resolv.conf -# Autogenerated by live-initramfs +# Autogenerated by live-boot search ${rc_search} domain ${rc_search} ${rc_server0} diff --git a/scripts/live-bottom/24preseed b/scripts/live-bottom/24preseed index 1f5c513..85c6494 100755 --- a/scripts/live-bottom/24preseed +++ b/scripts/live-bottom/24preseed @@ -18,7 +18,7 @@ case "${1}" in ;; esac -# live-initramfs header +# live-boot header if [ -n "${NOPRESEED}" ] then @@ -26,22 +26,21 @@ then fi . /scripts/live-functions -load_confmodule log_begin_msg "Loading preseed file" -# live-initramfs script +# live-boot script if [ -e /preseed.cfg ] then - live-set-selections /preseed.cfg + chroot /root debconf-set-selections < /preseed.cfg fi if [ -n "${LOCATIONS}" ] then for item in ${LOCATIONS} do - live-set-selections "/root$item" + chroot /root debconf-set-selections < "/root${item}" done fi @@ -56,20 +55,14 @@ then done fi -if db_get preseed/early_command && [ "$RET" ] +reply="$(echo "GET preseed/early_command" | chroot /root debconf-communicate -fnoninteractive live-boot)" + +if [ "${reply#0 }" != "${reply}" ] then - EARLY="$RET" - if db_get preseed/allow-network && [ "$RET" = true ]; then - start_network - fi - - DEBIAN_HAS_FRONTEND= DEBCONF_REDIR= \ - DEBIAN_FRONTEND=noninteractive \ - sh -c "$EARLY" + reply="${reply#0 }" + sh -c "${reply}" fi -stop_network - # Clear out debconf database backup files to save memory. rm -f /root/var/cache/debconf/*.dat-old diff --git a/scripts/live-bottom/25configure_init b/scripts/live-bottom/25configure_init index c06617f..a84eb75 100755 --- a/scripts/live-bottom/25configure_init +++ b/scripts/live-bottom/25configure_init @@ -18,13 +18,13 @@ case "${1}" in ;; esac -# live-initramfs header +# live-boot header . /scripts/live-functions log_begin_msg "Setting up init" -# live-initramfs script +# live-boot script # Arrange for shells on virtual consoles, rather than login prompts diff --git a/scripts/live-bottom/30accessibility b/scripts/live-bottom/30accessibility index 75bfae4..ef83c72 100755 --- a/scripts/live-bottom/30accessibility +++ b/scripts/live-bottom/30accessibility @@ -18,7 +18,7 @@ case "${1}" in ;; esac -# live-initramfs header +# live-boot header if [ -n "${NOACCESSIBILITY}" ] then @@ -35,7 +35,7 @@ fi log_begin_msg "Configuring accessibility options" -# live-initramfs script +# live-boot script gconf_version=$(chroot /root /usr/bin/dpkg-query -W --showformat='${Version}' gconf2 2>/dev/null) || gconf_version="" diff --git a/scripts/live-bottom/31disable_update_notifier b/scripts/live-bottom/31disable_update_notifier deleted file mode 100755 index 0edf189..0000000 --- a/scripts/live-bottom/31disable_update_notifier +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/sh - -#set -e - -# initramfs-tools header - -PREREQ="" - -prereqs() -{ - echo "${PREREQ}" -} - -case "${1}" in - prereqs) - prereqs - exit 0 - ;; -esac - -# live-initramfs header - -if [ -n "${NOUPDATENOTIFIER}" ] -then - exit 0 -fi - -. /scripts/live-functions - -log_begin_msg "Disabling update-notifier" - -# live-initramfs script - -# For GNOME, we divert away apt-check to avoid a regular 'apt-get update' -# equivalent in the live session. We want to run update-notifier for crash -# report handling. -chroot /root dpkg-divert --add --rename --quiet \ - /usr/lib/update-notifier/apt-check - -if [ -e /root/usr/lib/update-notifier/apt-check ] -then - ln -sf /bin/true /root/usr/lib/update-notifier/apt-check -fi - -# For KDE, adept_notifier's only useful function at the moment is an -# 'apt-get update' equivalent, so we disable it entirely. -rm -f /root/usr/share/autostart/adept_notifier_auto.desktop - -log_end_msg diff --git a/scripts/live-bottom/32disable_hibernation b/scripts/live-bottom/32disable_hibernation deleted file mode 100755 index f4960e6..0000000 --- a/scripts/live-bottom/32disable_hibernation +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/sh - -#set -e - -# initramfs-tools header - -PREREQ="" - -prereqs() -{ - echo "${PREREQ}" -} - -case "${1}" in - prereqs) - prereqs - exit 0 - ;; -esac - -# live-initramfs header - -if [ -n "${NOPOWERMANAGEMENT}" ] -then - exit 0 -fi - -. /scripts/live-functions - -log_begin_msg "Configuring power management" - -# live-initramfs script - -gpm_version=$(chroot /root /usr/bin/dpkg-query -W --showformat='${Version}' gnome-power-manager 2>/dev/null) || panel_version="" - -if [ -n "${gpm_version}" ] && [ -n "${USERNAME}" ] -then - #live-reconfigure /root gnome-power-manager - # Gnome < 2.20 - chroot /root sudo -u "${USERNAME}" gconftool-2 -s -t bool /apps/gnome-power-manager/can_hibernate false - # Gnome >= 2.20 - chroot /root sudo -u "${USERNAME}" gconftool-2 -s -t bool /apps/gnome-power-manager/general/can_hibernate false -fi - -log_end_msg diff --git a/scripts/live-bottom/33enable_apport_crashes b/scripts/live-bottom/33enable_apport_crashes deleted file mode 100755 index 47e650d..0000000 --- a/scripts/live-bottom/33enable_apport_crashes +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh - -#set -e - -# initramfs-tools header - -PREREQ="" - -prereqs() -{ - echo "${PREREQ}" -} - -case "${1}" in - prereqs) - prereqs - exit 0 - ;; -esac - -# live-initramfs header - -if [ -n "${NOPROGRAMCRASHES}" ] -then - exit 0 -fi - -. /scripts/live-functions - -log_begin_msg "Enabling detection of crashes" - -# live-initramfs script - -if [ -e /root/etc/default/apport ] -then - sed -i 's/enabled=0/enabled=1/' /root/etc/default/apport -fi - -log_end_msg diff --git a/scripts/live-bottom/34disable_kaboom b/scripts/live-bottom/34disable_kaboom deleted file mode 100755 index 2bb474c..0000000 --- a/scripts/live-bottom/34disable_kaboom +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh - -#set -e - -# initramfs-tools header - -PREREQ="" - -prereqs() -{ - echo "${PREREQ}" -} - -case "${1}" in - prereqs) - prereqs - exit 0 - ;; -esac - -# live-initramfs header - -. /scripts/live-functions - -log_begin_msg "Disabling kaboom" - -# live-initramfs script - -if [ -e /root/etc/kde4 ] -then - mkdir -p /root/home/${USERNAME}/.local - touch /root/home/${USERNAME}/.local/kaboom -fi - -log_end_msg diff --git a/scripts/live-bottom/34disable_kde_services b/scripts/live-bottom/34disable_kde_services deleted file mode 100755 index 41f881c..0000000 --- a/scripts/live-bottom/34disable_kde_services +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/sh - -#set -e - -# initramfs-tools header - -PREREQ="" - -prereqs() -{ - echo "${PREREQ}" -} - -case "${1}" in - prereqs) - prereqs - exit 0 - ;; -esac - -# live-initramfs header - -. /scripts/live-functions - -log_begin_msg "Disabling unnecessary KDE services..." - -# live-initramfs script - -rm -f /root/usr/share/autostart/kab2kabc.desktop -rm -f /root/usr/share/autostart/kabcdistlistupdater.desktop -rm -f /root/usr/share/autostart/korgac.desktop -rm -f /root/usr/share/autostart/printer-applet.desktop -rm -f /root/usr/share/autostart/nepomukserver.desktop -rm -f /root/usr/share/kde4/services/kwalletd.desktop -rm -f /root/usr/share/kde4/services/kded/kpackagekitd.desktop -rm -f /root/usr/share/kde4/services/kded/freespacenotifier.desktop -rm -f /root/usr/share/kde4/services/plasma-runner-contacts.desktop # starts akonadi -rm -f /root/usr/share/kde4/services/kded/notificationhelper.desktop - -log_end_msg diff --git a/scripts/live-bottom/34disable_kpersonalizer b/scripts/live-bottom/34disable_kpersonalizer deleted file mode 100755 index 8f6709b..0000000 --- a/scripts/live-bottom/34disable_kpersonalizer +++ /dev/null @@ -1,54 +0,0 @@ -#!/bin/sh - -#set -e - -# initramfs-tools header - -PREREQ="" - -prereqs() -{ - echo "${PREREQ}" -} - -case "${1}" in - prereqs) - prereqs - exit 0 - ;; -esac - -# live-initramfs header - -if [ -n "${NOKPERSONALIZER}" ] -then - exit 0 -fi - -. /scripts/live-functions - -log_begin_msg "Disabling kpersonalizer" - -# live-initramfs script - -if [ -e /root/etc/kde3 ] -then - if chroot /root /usr/bin/which kpersonalizer >/dev/null - then - # Disable first-login wizard for KDE - if [ ! -f /root/etc/kde3/kpersonalizerrc ] - then - -cat > /root/etc/kde3/kpersonalizerrc << EOF -[General] -FirstLogin=false -EOF - - else - echo "I'm not smart enough to disable kpersonalizer startup" >&2 - echo "Because kpersonalizerrc already exists" >&2 - fi - fi -fi - -log_end_msg diff --git a/scripts/live-bottom/35fix_language_selector b/scripts/live-bottom/35fix_language_selector deleted file mode 100755 index 8452d12..0000000 --- a/scripts/live-bottom/35fix_language_selector +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/sh - -#set -e - -# initramfs-tools header - -PREREQ="" - -prereqs() -{ - echo "${PREREQ}" -} - -case "${1}" in - prereqs) - prereqs - exit 0 - ;; -esac - -# live-initramfs header - -if [ -n "${NOLANGUAGESELECTOR}" ] -then - exit 0 -fi - -. /scripts/live-functions - -log_begin_msg "Fixing language selector" - -# live-initramfs script - -if [ -e /root/usr/share/applications/language-selector.desktop ] -then - sed -i '/^Exec/ s|/usr/bin/gnome-language-selector|& -n|' /root/usr/share/applications/language-selector.desktop -fi - -if [ -x /root/usr/bin/fontconfig-voodoo ] -then - chroot /root fontconfig-voodoo --auto --quiet || true -fi - -log_end_msg diff --git a/scripts/live-bottom/36disable_trackerd b/scripts/live-bottom/36disable_trackerd deleted file mode 100755 index 667131d..0000000 --- a/scripts/live-bottom/36disable_trackerd +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/sh - -#set -e - -# initramfs-tools header - -PREREQ="" - -prereqs() -{ - echo "${PREREQ}" -} - -case "${1}" in - prereqs) - prereqs - exit 0 - ;; -esac - -# live-initramfs header - -if [ -n "${NOTIMEZONE}" ] -then - exit 0 -fi - -. /scripts/live-functions - -log_begin_msg "Disabling trackerd" - -# live-initramfs script - -rm -f /root/etc/xdg/autostart/tracker-applet.desktop \ - /root/etc/xdg/autostart/trackerd.desktop \ - /root/usr/share/autostart/trackerd.desktop - -log_end_msg diff --git a/scripts/live-bottom/41apt_cdrom b/scripts/live-bottom/41apt_cdrom index eb7fbd8..1a36e7f 100755 --- a/scripts/live-bottom/41apt_cdrom +++ b/scripts/live-bottom/41apt_cdrom @@ -18,7 +18,7 @@ case "${1}" in ;; esac -# live-initramfs header +# live-boot header if [ -n "${NOAPTCDROM}" ] then @@ -29,7 +29,7 @@ fi log_begin_msg "Adding APT-CDROM source" -# live-initramfs script +# live-boot script if [ -d /root/cdrom ] then diff --git a/scripts/live-bottom/43disable_updateinitramfs b/scripts/live-bottom/43disable_updateinitramfs deleted file mode 100755 index 44e2d1f..0000000 --- a/scripts/live-bottom/43disable_updateinitramfs +++ /dev/null @@ -1,73 +0,0 @@ -#!/bin/sh - -#set -e - -# initramfs-tools header - -PREREQ="" - -prereqs() -{ - echo "${PREREQ}" -} - -case "${1}" in - prereqs) - prereqs - exit 0 - ;; -esac - -# live-initramfs header - -. /scripts/live-functions - -log_begin_msg "Possibly disabling update-initramfs (useless on a live CD)..." - -# live-initramfs script - -chroot /root dpkg-divert --add --rename --quiet \ - /usr/sbin/update-initramfs - -# Running off a USB disk or other writable media. -if [ -w /root/cdrom ] && \ - # rw is guaranteed to be first. - grep -q ' /root/cdrom rw[, ]' /proc/self/mountinfo -then - -cat > /root/usr/sbin/update-initramfs << 'EOF' -#!/bin/sh - -set -e - -update-initramfs.distrib "$@" - -if [ -e /cdrom/live/initrd.lz ] -then - zcat /initrd.img | lzma -9c >/cdrom/live/initrd.lz.new - mv /cdrom/live/initrd.lz.new /cdrom/live/initrd.lz -else - cp /initrd.img /cdrom/live/initrd.gz.new - mv /cdrom/live/initrd.gz.new /cdrom/live/initrd.gz -fi - -cp /vmlinuz /cdrom/live/vmlinuz.new -mv /cdrom/live/vmlinuz.new /cdrom/live/vmlinuz - -exit 0 -EOF - -else - -cat > /root/usr/sbin/update-initramfs << EOF -#!/bin/sh - -echo "update-initramfs is disabled since running on read-only media" -exit 0 -EOF - -fi - -chmod 0755 /root/usr/sbin/update-initramfs - -log_end_msg diff --git a/scripts/live-bottom/44pk_allow b/scripts/live-bottom/44pk_allow deleted file mode 100755 index a211880..0000000 --- a/scripts/live-bottom/44pk_allow +++ /dev/null @@ -1,71 +0,0 @@ -#!/bin/sh - -#set -e - -# initramfs-tools header - -PREREQ="" - -prereqs() -{ - echo "${PREREQ}" -} - -case "${1}" in - prereqs) - prereqs - exit 0 - ;; -esac - -# live-initramfs header - -. /scripts/live-functions - -log_begin_msg "Grant administrative PolicyKit pivilieges to default user" - -# live-initramfs script - -# configure PolicyKit in live session -mkdir -p /root/etc/PolicyKit -cat << EOF > /root/etc/PolicyKit/PolicyKit.conf -<?xml version="1.0" encoding="UTF-8"?> <!-- -*- XML -*- --> - -<!DOCTYPE pkconfig PUBLIC "-//freedesktop//DTD PolicyKit Configuration 1.0//EN" -"http://hal.freedesktop.org/releases/PolicyKit/1.0/config.dtd"> - -<!-- See the manual page PolicyKit.conf(5) for file format --> - -<config version="0.1"> - <match user="root"> - <return result="yes"/> - </match> -EOF - -if [ -n "${USERNAME}" ] -then - cat << EOF >> /root/etc/PolicyKit/PolicyKit.conf - <!-- don't ask password for user in live session --> - <match user="$USERNAME"> - <return result="yes"/> - </match> -EOF -fi - -cat << EOF >> /root/etc/PolicyKit/PolicyKit.conf - <define_admin_auth group="admin"/> -</config> -EOF - -mkdir -p /root/var/lib/polkit-1/localauthority/10-vendor.d -cat << EOF > /root/var/lib/polkit-1/localauthority/10-vendor.d/10-live-cd.pkla -# Policy to allow the livecd user to bypass policykit -[Live CD user permissions] -Identity=unix-user:$USERNAME -Action=* -ResultAny=no -ResultInactive=no -ResultActive=yes -EOF - -log_end_msg diff --git a/scripts/live-bottom/99hook b/scripts/live-bottom/99hook deleted file mode 100755 index 8809800..0000000 --- a/scripts/live-bottom/99hook +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/sh - -#set -e - -# initramfs-tools header - -PREREQ="" - -prereqs() -{ - echo "${PREREQ}" -} - -case "${1}" in - prereqs) - prereqs - exit 0 - ;; -esac - -# live-initramfs header - -if [ -z "${HOOK}" ] -then - exit 0 -fi - -. /scripts/live-functions - -log_begin_msg "Executing custom hook script" - -# live-initramfs script - -cd /root - -if [ $(echo "${HOOK}" | grep file:\/\/) ] -then - LOCALFILE=$(echo ${HOOK} | sed "s/file\:\/\///") - cp ${LOCALFILE} /root -else - chroot /root wget "${HOOK}" -fi - -FILE="$(basename ${HOOK})" - -chmod 0755 "${FILE}" -./"${FILE}" -rm -f "${FILE}" - -log_end_msg |
