summaryrefslogtreecommitdiff
path: root/scripts/live-bottom
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2007-09-23 14:46:42 +0200
committerDaniel Baumann <daniel@debian.org>2011-03-09 17:31:05 +0100
commitfdd8036ba32ad88e83a61191cc4597ae060355d2 (patch)
treefe1bfc2da930128100db011d642be562ed82867e /scripts/live-bottom
parent140b179f0ff73f3cc1c081f6e6641417a5a0788d (diff)
downloadlive-boot-fdd8036ba32ad88e83a61191cc4597ae060355d2.tar.gz
live-boot-fdd8036ba32ad88e83a61191cc4597ae060355d2.zip
Adding live-initramfs 1.99.2-1.
Diffstat (limited to 'scripts/live-bottom')
-rwxr-xr-xscripts/live-bottom/02etc_live_conf24
-rwxr-xr-xscripts/live-bottom/02timezone24
-rwxr-xr-xscripts/live-bottom/05mountpoints7
-rwxr-xr-xscripts/live-bottom/10adduser103
-rwxr-xr-xscripts/live-bottom/12fstab5
-rwxr-xr-xscripts/live-bottom/13swap32
-rwxr-xr-xscripts/live-bottom/14locales107
-rwxr-xr-xscripts/live-bottom/15autologin70
-rwxr-xr-xscripts/live-bottom/18hostname9
-rwxr-xr-xscripts/live-bottom/19keyboard82
-rwxr-xr-xscripts/live-bottom/20xconfig58
-rwxr-xr-xscripts/live-bottom/21xvidemode5
-rwxr-xr-xscripts/live-bottom/22gnome_panel_data20
-rwxr-xr-xscripts/live-bottom/22screensaver5
-rwxr-xr-xscripts/live-bottom/23etc_modules8
-rwxr-xr-xscripts/live-bottom/23networking118
-rwxr-xr-xscripts/live-bottom/24preseed30
-rwxr-xr-xscripts/live-bottom/25configure_init157
-rwxr-xr-xscripts/live-bottom/30accessibility197
-rwxr-xr-xscripts/live-bottom/31disable_update_notifier6
-rwxr-xr-xscripts/live-bottom/32disable_hibernation22
-rwxr-xr-xscripts/live-bottom/33enable_apport_crashes11
-rwxr-xr-xscripts/live-bottom/34disable_kpersonalizer51
-rwxr-xr-xscripts/live-bottom/34disable_kwallet5
-rwxr-xr-xscripts/live-bottom/35fix_language_selector16
-rwxr-xr-xscripts/live-bottom/38disable_restricted_manager11
-rwxr-xr-xscripts/live-bottom/40install_driver_updates17
-rwxr-xr-xscripts/live-bottom/41apt_cdrom5
28 files changed, 745 insertions, 460 deletions
diff --git a/scripts/live-bottom/02etc_live_conf b/scripts/live-bottom/02etc_live_conf
index e52d913..48b12d1 100755
--- a/scripts/live-bottom/02etc_live_conf
+++ b/scripts/live-bottom/02etc_live_conf
@@ -26,17 +26,21 @@ log_begin_msg "Copying config on real root fs..."
# live-initramfs script
-if [ -f /etc/live.conf ] ; then
- if [ ! -z "${LIVECONF}" ]; then
- # Updating live.conf
- sed -i -e 's/\(USERNAME="\).*"/\1'"${USERNAME}"'"/g' \
- -e 's/\(USERFULLNAME="\).*"/\1'"${USERFULLNAME}"'"/g' \
- -e 's/\(HOSTNAME="\).*"/\1'"${HOSTNAME}"'"/g' /etc/live.conf
- fi
- cp -p /etc/live.conf /root/etc/live.conf
-
+if [ -f /etc/live.conf ]
+then
+ if [ ! -z "${LIVECONF}" ]
+ then
+ # Updating live.conf
+ sed -i -e 's/\(USERNAME="\).*"/\1'"${USERNAME}"'"/g' \
+ -e 's/\(USERFULLNAME="\).*"/\1'"${USERFULLNAME}"'"/g' \
+ -e 's/\(HOSTNAME="\).*"/\1'"${HOSTNAME}"'"/g' \
+ /etc/live.conf
+ fi
+
+ cp -p /etc/live.conf /root/etc/live.conf
else
- cat <<EOF >/root/etc/live.conf
+
+cat > /root/etc/live.conf << EOF
export USERNAME="$USERNAME"
export USERFULLNAME="$USERFULLNAME"
export HOSTNAME="$HOSTNAME"
diff --git a/scripts/live-bottom/02timezone b/scripts/live-bottom/02timezone
index dad3cad..e272da9 100755
--- a/scripts/live-bottom/02timezone
+++ b/scripts/live-bottom/02timezone
@@ -20,26 +20,36 @@ 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
+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
+
+ cp -f /root/usr/share/zoneinfo/${area}/${zone} /root/etc/localtime
else
- chroot /root debconf-communicate -fnoninteractive live-initramfs > /dev/null <<EOF
+
+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
+
+ cp -f /root/usr/share/zoneinfo/UTC /root/etc/localtime
fi
if [ -n "${UTC}" ]
diff --git a/scripts/live-bottom/05mountpoints b/scripts/live-bottom/05mountpoints
index 028c74b..a334af8 100755
--- a/scripts/live-bottom/05mountpoints
+++ b/scripts/live-bottom/05mountpoints
@@ -27,9 +27,10 @@ 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 -n --move /live/image /root/live/image
+if [ ! -d /root/live/image ]
+then
+ mkdir -p /root/live/image
+ mount -n --move /live/image /root/live/image
fi
log_end_msg
diff --git a/scripts/live-bottom/10adduser b/scripts/live-bottom/10adduser
index 0f28def..4c83fa3 100755
--- a/scripts/live-bottom/10adduser
+++ b/scripts/live-bottom/10adduser
@@ -20,20 +20,26 @@ esac
# live-initramfs header
+if [ -n "${NOUSER}" ]
+then
+ exit 0
+fi
+
. /scripts/live-functions
log_begin_msg "Adding live session user..."
# live-initramfs script
-if [ "${BUILD_SYSTEM}" = "Debian" ]; then
- user_crypted="8Ab05sVQ4LLps" # as in `echo "live" | mkpasswd -s`
+if [ "${BUILD_SYSTEM}" = "Debian" ]
+then
+ user_crypted="8Ab05sVQ4LLps" # as in `echo "live" | mkpasswd -s`
else
- user_crypted="U6aMy0wojraho" # "ubuntu"
+ user_crypted="U6aMy0wojraho" # "ubuntu"
fi
# U6aMy0wojraho is just a blank password
-chroot /root debconf-communicate -fnoninteractive live-initramfs > /dev/null <<EOF
+chroot /root debconf-communicate -fnoninteractive live-initramfs > /dev/null << EOF
set passwd/make-user true
set passwd/root-password-crypted *
set passwd/user-password-crypted ${user_crypted}
@@ -42,16 +48,17 @@ set passwd/username $USERNAME
set passwd/user-uid 999
EOF
-if [ "${BUILD_SYSTEM}" = "Debian" ]; then
- chroot /root /usr/bin/env -i HOME="/root" \
- TERM="${TERM}" PATH="/usr/sbin:/usr/bin:/sbin:/bin" \
- /usr/lib/user-setup/user-setup-apply > /dev/null
+if [ "${BUILD_SYSTEM}" = "Debian" ]
+then
+ chroot /root /usr/bin/env -i HOME="/root" \
+ TERM="${TERM}" PATH="/usr/sbin:/usr/bin:/sbin:/bin" \
+ /usr/lib/user-setup/user-setup-apply > /dev/null
else
- chroot /root /usr/lib/user-setup/user-setup-apply > /dev/null
+ chroot /root /usr/lib/user-setup/user-setup-apply > /dev/null
fi
# Clear out debconf database again to avoid confusing ubiquity later.
-chroot /root debconf-communicate -fnoninteractive live-initramfs > /dev/null <<EOF
+chroot /root debconf-communicate -fnoninteractive live-initramfs > /dev/null << EOF
set passwd/make-user
set passwd/root-password-crypted
set passwd/user-password-crypted
@@ -62,54 +69,58 @@ EOF
if [ -z "${NOSUDO}" ]
then
-
-if [ -f /root/etc/sudoers ]; then
- if [ "${BUILD_SYSTEM}" = "Ubuntu" ]; then
- grep -q '^%admin' /root/etc/sudoers && sed -i -e '/^%admin/s/ALL$/NOPASSWD: ALL/' /root/etc/sudoers || echo '%admin ALL=(ALL) NOPASSWD: ALL' >> /root/etc/sudoers
-
- # XXX - awful hack to stop xscreensaver locking the screen (#7150)
- echo 'RUNNING_UNDER_GDM="yes"' >> /root/etc/environment
-
- for file in /usr/share/applications/ubiquity-gtkui.desktop /usr/share/applications/kde/ubiquity-kdeui.desktop; do
- if [ -f "/root/$file" ]; then
- chroot /root install -D -o $USERNAME -g $USERNAME $file /home/$USERNAME/Desktop/$(basename "$file")
- break
- fi
- done
- elif [ "${BUILD_SYSTEM}" = "Debian" ]; 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"
-
- 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
+ if [ -f /root/etc/sudoers ]
+ then
+ if [ "${BUILD_SYSTEM}" = "Ubuntu" ]
+ then
+ grep -q '^%admin' /root/etc/sudoers && sed -i -e '/^%admin/s/ALL$/NOPASSWD: ALL/' /root/etc/sudoers || echo '%admin ALL=(ALL) NOPASSWD: ALL' >> /root/etc/sudoers
+
+ # XXX - awful hack to stop xscreensaver locking the screen (#7150)
+ echo 'RUNNING_UNDER_GDM="yes"' >> /root/etc/environment
+
+ for file in /usr/share/applications/ubiquity-gtkui.desktop /usr/share/applications/kde/ubiquity-kdeui.desktop
+ do
+ if [ -f "/root/$file" ]
+ then
+ chroot /root install -D -o $USERNAME -g $USERNAME $file /home/$USERNAME/Desktop/$(basename "$file")
+ break
+ fi
+ done
+ elif [ "${BUILD_SYSTEM}" = "Debian" ]
+ 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"
+ 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
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/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"
+ 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
- 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 [ -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/usr/share/apps/khelpcenter/plugins/kubuntu/about-kubuntu.desktop.tobemoved" ]; then
- chroot /root install -D -o $USERNAME -g $USERNAME /usr/share/apps/khelpcenter/plugins/kubuntu/about-kubuntu.desktop.tobemoved /home/$USERNAME/Desktop/about-kubuntu.desktop
+if [ -f "/root/usr/share/apps/khelpcenter/plugins/kubuntu/about-kubuntu.desktop.tobemoved" ]
+then
+ chroot /root install -D -o $USERNAME -g $USERNAME /usr/share/apps/khelpcenter/plugins/kubuntu/about-kubuntu.desktop.tobemoved /home/$USERNAME/Desktop/about-kubuntu.desktop
fi
log_end_msg
diff --git a/scripts/live-bottom/12fstab b/scripts/live-bottom/12fstab
index b5b5602..73e18d4 100755
--- a/scripts/live-bottom/12fstab
+++ b/scripts/live-bottom/12fstab
@@ -22,6 +22,11 @@ esac
. /scripts/live-functions
+if [ -n "${NOFSTAB}" ]
+then
+ exit 0
+fi
+
log_begin_msg "Configuring fstab..."
# live-initramfs script
diff --git a/scripts/live-bottom/13swap b/scripts/live-bottom/13swap
index 8b47a00..4980433 100755
--- a/scripts/live-bottom/13swap
+++ b/scripts/live-bottom/13swap
@@ -20,7 +20,7 @@ esac
# live-initramfs header
-if [ -n "${NOSWAP}" ]
+if [ -n "${NOSWAP}" ] || [ -n "${NOFSTAB}" ]
then
exit 0
fi
@@ -32,25 +32,31 @@ log_begin_msg "Setting up swap..."
# live-initramfs script
FSTAB=/root/etc/fstab
-
devices=""
-for device in /dev/[hs]d[a-z][0-9]*; do
- if ! [ -b "$device" ]; then
- continue
- fi
- magic=$(/bin/dd if="$device" bs=4086 skip=1 count=1 2>/dev/null | /bin/dd bs=10 count=1 2>/dev/null) || continue
+for device in /dev/[hs]d[a-z][0-9]*
+do
+ if ! [ -b "$device" ]
+ then
+ continue
+ fi
+
+ magic=$(/bin/dd if="$device" bs=4086 skip=1 count=1 2>/dev/null | /bin/dd bs=10 count=1 2>/dev/null) || continue
- if [ "$magic" = "SWAPSPACE2" -o "$magic" = "SWAP-SPACE" ]; then
-# log "Found $device"
- devices="$devices $device"
- fi
+ if [ "$magic" = "SWAPSPACE2" -o "$magic" = "SWAP-SPACE" ]
+ then
+ #log "Found $device"
+ devices="$devices $device"
+ fi
done
-for device in $devices; do
- cat >> $FSTAB <<EOF
+for device in $devices
+do
+
+cat >> $FSTAB << EOF
$device swap swap defaults 0 0
EOF
+
done
log_end_msg
diff --git a/scripts/live-bottom/14locales b/scripts/live-bottom/14locales
index bdb1d8b..2de535e 100755
--- a/scripts/live-bottom/14locales
+++ b/scripts/live-bottom/14locales
@@ -20,65 +20,84 @@ esac
# live-initramfs header
+if [ -n "${NOLOCALES}" ]
+then
+ exit 0
+fi
+
. /scripts/live-functions
log_begin_msg "Setting up locales..."
# live-initramfs script
-if [ -e /root/etc/default/locale ]; then
- grep_file=/root/etc/default/locale
-elif [ -e /root/etc/environment ]; then # Old locales policy
- grep_file=/root/etc/environment
+if [ -e /root/etc/default/locale ]
+then
+ grep_file=/root/etc/default/locale
+elif [ -e /root/etc/environment ]
+then
+ # Old locales policy
+ grep_file=/root/etc/environment
fi
-if [ -n "${grep_file}" ]; then
- # use rootfs configured locale
- locale=$(grep -s 'LANG=' ${grep_file} | sed s/'LANG='// | tr -d '"' )
+if [ -n "${grep_file}" ]
+then
+ # use rootfs configured locale
+ locale=$(grep -s 'LANG=' ${grep_file} | sed s/'LANG='// | tr -d '"' )
else
- grep_file=/root/etc/default/locale
+ grep_file=/root/etc/default/locale
fi
-if [ -n "${LOCALE}" ]; then
- locale="${LOCALE}"
- set_locale="true"
+if [ -n "${LOCALE}" ]
+then
+ locale="${LOCALE}"
+ set_locale="true"
fi
-if [ -z "${locale}" ]; then
- # Set a default one
- locale=en_US.UTF-8
- set_locale="true"
+if [ -z "${locale}" ]
+then
+ # Set a default one
+ locale=en_US.UTF-8
+ set_locale="true"
fi
-if [ "${set_locale}" ]; then
- if echo "${locale}" | grep -sqE '^[[:lower:]]{2}$' ; then
- # input is like "locale=it", so we will convert and setup also the keyboard if not already set
- if [ -z "${KBD}" ]; then
- # FIXME: look if this keyb is supported
- KBD="${locale}"
- really_export KBD
- fi
- uploc=$(echo "${locale}" | tr '[a-z]' '[A-Z]')
- locale="${locale}_${uploc}.UTF-8"
- fi
- LANG=$(grep "^${locale}" /root/usr/share/i18n/SUPPORTED | grep UTF-8 |sed -e 's, .*,,' -e q)
- if [ -z "${LANG}" ]; then
- log_warning_message "Locale ${locale} is unsupported."
- locale="en_US.UTF-8"
- LANG="${locale}"
- fi
-
- really_export LANG
-
- if [ "${BUILD_SYSTEM}" = "Ubuntu" ]; then
- printf 'LANG="%s"\n' "${LANG}" > "${grep_file}"
- chroot /root /usr/sbin/locale-gen "${LANG}"
- live-preseed /root debian-installer/locale "${locale}"
- else
- printf 'LANG=%s\n' "${LANG}" > "${grep_file}"
- printf '%s UTF-8\n' "${LANG}" > /root/etc/locale.gen
- chroot /root /usr/sbin/locale-gen
- fi
+if [ "${set_locale}" ]
+then
+ if echo "${locale}" | grep -sqE '^[[:lower:]]{2}$'
+ then
+ # input is like "locale=it", so we will convert and setup also the keyboard if not already set
+ if [ -z "${KBD}" ]
+ then
+ # FIXME: look if this keyb is supported
+ KBD="${locale}"
+ really_export KBD
+ fi
+
+ uploc=$(echo "${locale}" | tr '[a-z]' '[A-Z]')
+ locale="${locale}_${uploc}.UTF-8"
+ fi
+
+ LANG=$(grep "^${locale}" /root/usr/share/i18n/SUPPORTED | grep UTF-8 | sed -e 's, .*,,' -e q)
+
+ if [ -z "${LANG}" ]
+ then
+ log_warning_message "Locale ${locale} is unsupported."
+ locale="en_US.UTF-8"
+ LANG="${locale}"
+ fi
+
+ really_export LANG
+
+ if [ "${BUILD_SYSTEM}" = "Ubuntu" ]
+ then
+ printf 'LANG="%s"\n' "${LANG}" > "${grep_file}"
+ chroot /root /usr/sbin/locale-gen "${LANG}"
+ live-preseed /root debian-installer/locale "${locale}"
+ else
+ printf 'LANG=%s\n' "${LANG}" > "${grep_file}"
+ printf '%s UTF-8\n' "${LANG}" > /root/etc/locale.gen
+ chroot /root /usr/sbin/locale-gen
+ fi
fi
log_end_msg
diff --git a/scripts/live-bottom/15autologin b/scripts/live-bottom/15autologin
index 4de38f9..40383cb 100755
--- a/scripts/live-bottom/15autologin
+++ b/scripts/live-bottom/15autologin
@@ -26,55 +26,45 @@ log_begin_msg "Setting up automatic login..."
# live-initramfs script
-if [ -z "${NOXAUTOLOGIN}" ]
+if [ -n "${NOXAUTOLOGIN}" ]
then
+ exit 0
+fi
# chroot needed to handle symlinks correctly
-if chroot /root [ -f /etc/gdm/gdm-cdd.conf ]; then
- GDMCONF=/etc/gdm/gdm-cdd.conf
+if chroot /root [ -f /etc/gdm/gdm-cdd.conf ]
+then
+ GDMCONF=/etc/gdm/gdm-cdd.conf
else
- GDMCONF=/etc/gdm/gdm.conf
+ GDMCONF=/etc/gdm/gdm.conf
fi
# chroot needed to handle symlinks correctly
-if chroot /root [ -f ${GDMCONF} ]; then
- if [ "${BUILD_SYSTEM}" = "Debian" ]; then
- # true hack ! -- nohar
- chroot /root cp /usr/share/gdm/defaults.conf /etc/gdm/gdm.conf
- fi
-
- # 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}
-fi
-
-if [ -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
-fi
-
+if chroot /root [ -f ${GDMCONF} ]
+then
+ if [ "${BUILD_SYSTEM}" = "Debian" ]
+ then
+ # true hack ! -- nohar
+ chroot /root cp /usr/share/gdm/defaults.conf /etc/gdm/gdm.conf
+ fi
+
+ # 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}
fi
-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
+if [ -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
fi
log_end_msg
diff --git a/scripts/live-bottom/18hostname b/scripts/live-bottom/18hostname
index 430d0a0..ac35389 100755
--- a/scripts/live-bottom/18hostname
+++ b/scripts/live-bottom/18hostname
@@ -20,6 +20,11 @@ esac
# live-initramfs header
+if [ -n "${NOHOSTS}" ]
+then
+ exit 0
+fi
+
. /scripts/live-functions
log_begin_msg "Setting hostname..."
@@ -27,7 +32,8 @@ log_begin_msg "Setting hostname..."
# live-initramfs script
echo "$HOSTNAME" > /root/etc/hostname
-cat >> /root/etc/hosts <<EOF
+
+cat >> /root/etc/hosts << EOF
127.0.0.1 localhost
127.0.1.1 $HOSTNAME
@@ -38,7 +44,6 @@ ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
-
EOF
log_end_msg
diff --git a/scripts/live-bottom/19keyboard b/scripts/live-bottom/19keyboard
index 974b847..ef91c90 100755
--- a/scripts/live-bottom/19keyboard
+++ b/scripts/live-bottom/19keyboard
@@ -20,6 +20,11 @@ esac
# live-initramfs header
+if [ -n "${NOCONSOLEKEYBOARD}" ]
+then
+ exit 0
+fi
+
. /scripts/live-functions
log_begin_msg "Setting up console keyboard..."
@@ -32,50 +37,63 @@ csvariant=
csmodel=
# commandline
-if [ -n "${KBD}" ]; then
- kbd="${KBD}"
+if [ -n "${KBD}" ]
+then
+ kbd="${KBD}"
else
- kbd=us
+ kbd=us
fi
really_export kbd
-if [ -n "${KLAYOUT}" ]; then
- cslayout="${KLAYOUT}"
+if [ -n "${KLAYOUT}" ]
+then
+ cslayout="${KLAYOUT}"
fi
-if [ -n "${KVARIANT}" ]; then
- csvariant="${KVARIANT}"
+
+if [ -n "${KVARIANT}" ]
+then
+ csvariant="${KVARIANT}"
fi
-if [ -n "${KMODEL}" ]; then
- csmodel="${KMODEL}"
+
+if [ -n "${KMODEL}" ]
+then
+ csmodel="${KMODEL}"
fi
-if [ -x /root/bin/setupcon ] && [ -f /root/etc/default/console-setup ]; then
- if [ "$cslayout" ]; then
- chroot /root sed -i "s/^XKBLAYOUT=.*/XKBLAYOUT=\"$cslayout\"/" \
- /etc/default/console-setup
- if [ "$csvariant" ]; then
- chroot /root sed -i "s/^XKBVARIANT=.*/XKBVARIANT=\"$csvariant\"/" \
- /etc/default/console-setup
- else
- live-preseed /root console-setup/variantcode '' false
- fi
- if [ "$csmodel" ]; then
- chroot /root sed -i "s/^XKBMODEL=.*/XKBMODEL=\"$csmodel\"/" \
- /etc/default/console-setup
- else
- live-preseed /root console-setup/modelcode '' false
- fi
- else
- live-preseed /root console-setup/layoutcode '' false
- live-preseed /root console-setup/variantcode '' false
- live-preseed /root console-setup/modelcode '' false
- fi
+if [ -x /root/bin/setupcon ] && [ -f /root/etc/default/console-setup ]
+then
+ if [ "$cslayout" ]
+ then
+ chroot /root sed -i "s/^XKBLAYOUT=.*/XKBLAYOUT=\"$cslayout\"/" \
+ /etc/default/console-setup
+
+ if [ "$csvariant" ]
+ then
+ chroot /root sed -i "s/^XKBVARIANT=.*/XKBVARIANT=\"$csvariant\"/" \
+ /etc/default/console-setup
+ else
+ live-preseed /root console-setup/variantcode '' false
+ fi
+
+ if [ "$csmodel" ]
+ then
+ chroot /root sed -i "s/^XKBMODEL=.*/XKBMODEL=\"$csmodel\"/" \
+ /etc/default/console-setup
+ else
+ live-preseed /root console-setup/modelcode '' false
+ fi
+ else
+ live-preseed /root console-setup/layoutcode '' false
+ live-preseed /root console-setup/variantcode '' false
+ live-preseed /root console-setup/modelcode '' false
+ fi
sed -i 's/CONSOLE_SCREEN=$/CONSOLE_SCREEN=setupcon/; t END; b; : END; n; b END' /root/etc/init.d/usplash
else
- chroot /root /usr/sbin/install-keymap $kbd
- live-preseed /root debian-installer/keymap "$kbd"
+ chroot /root /usr/sbin/install-keymap $kbd
+ live-preseed /root debian-installer/keymap "$kbd"
live-preseed /root kbd-chooser/method "$kbd"
fi
+
log_end_msg
diff --git a/scripts/live-bottom/20xconfig b/scripts/live-bottom/20xconfig
index 1105e4a..902335e 100755
--- a/scripts/live-bottom/20xconfig
+++ b/scripts/live-bottom/20xconfig
@@ -20,16 +20,22 @@ esac
# live-initramfs header
+if [ -n "${NOXAUTOCONFIG}" ]
+then
+ exit 0
+fi
+
. /scripts/live-functions
log_begin_msg "Configuring X..."
# live-initramfs script
-if [ "$TERM_TYPE" = "serial" ]; then
- # Don't bother trying to configure or start X on a serial console
- rm -f /etc/rc?.d/S??[gxk]dm
- exit 0
+if [ "$TERM_TYPE" = "serial" ]
+then
+ # Don't bother trying to configure or start X on a serial console
+ rm -f /etc/rc?.d/S??[gxk]dm
+ exit 0
fi
locale=en_US.UTF-8
@@ -38,34 +44,44 @@ mount -n -o bind /sys /root/sys
mount -n -o bind /proc /root/proc
mount -n -o bind /dev /root/dev
-if [ -n "${XDEBCONF}" -a -x /root/usr/sbin/xdebconfigurator ]; then
- # xdebconfigurator
- chroot /root /usr/sbin/xdebconfigurator
+if [ -n "${XDEBCONF}" -a -x /root/usr/sbin/xdebconfigurator ]
+then
+ # xdebconfigurator
+ chroot /root /usr/sbin/xdebconfigurator
fi
-if [ "${BUILD_SYSTEM}" = "Ubuntu" ]; then
- chroot /root debconf-communicate -fnoninteractive live-initramfs > /dev/null <<EOF
+if [ "${BUILD_SYSTEM}" = "Ubuntu" ]
+then
+
+chroot /root debconf-communicate -fnoninteractive live-initramfs > /dev/null << EOF
set xserver-xorg/autodetect_keyboard true
fset xserver-xorg/autodetect_keyboard seen true
EOF
+
else
- # d-i code not present, so:
- if [ -n "${KOPTIONS}" ]; then
- setoptions="set xserver-xorg/config/inputdevice/keyboard/options ${KOPTIONS}"
- fi
- if [ -n "${KVARIANT}" ]; then
- setvariant="set xserver-xorg/config/inputdevice/keyboard/variant ${KVARIANT}"
- fi
- if [ -n "${KMODEL}" ]; then
- setmodel="set xserver-xorg/config/inputdevice/keyboard/model ${KMODEL}"
- fi
-
- chroot /root debconf-communicate -fnoninteractive live-initramfs > /dev/null <<EOF
+ # d-i code not present, so:
+ if [ -n "${KOPTIONS}" ]
+ then
+ setoptions="set xserver-xorg/config/inputdevice/keyboard/options ${KOPTIONS}"
+ fi
+
+ if [ -n "${KVARIANT}" ]
+ then
+ setvariant="set xserver-xorg/config/inputdevice/keyboard/variant ${KVARIANT}"
+ fi
+
+ if [ -n "${KMODEL}" ]
+ then
+ setmodel="set xserver-xorg/config/inputdevice/keyboard/model ${KMODEL}"
+ fi
+
+chroot /root debconf-communicate -fnoninteractive live-initramfs > /dev/null << EOF
set xserver-xorg/config/inputdevice/keyboard/layout ${kbd}
${setvariant}
${setmodel}
${setoptions}
EOF
+
fi
DEBUG_XORG_PACKAGE=1 DEBUG_XORG_DEBCONF=1 live-reconfigure /root xserver-xorg
diff --git a/scripts/live-bottom/21xvidemode b/scripts/live-bottom/21xvidemode
index 944bd33..a11dc77 100755
--- a/scripts/live-bottom/21xvidemode
+++ b/scripts/live-bottom/21xvidemode
@@ -20,6 +20,11 @@ esac
# live-initramfs header
+if [ -n "${NOXAUTOCONFIG}" ]
+then
+ exit 0
+fi
+
. /scripts/live-functions
log_begin_msg "Configuring X kludges..."
diff --git a/scripts/live-bottom/22gnome_panel_data b/scripts/live-bottom/22gnome_panel_data
index 34f0be1..8e071d3 100755
--- a/scripts/live-bottom/22gnome_panel_data
+++ b/scripts/live-bottom/22gnome_panel_data
@@ -20,22 +20,30 @@ esac
# live-initramfs header
-. /scripts/live-functions
+if [ -n "${NOGNOMEPANEL}" ]
+then
+ exit 0
+fi
+. /scripts/live-functions
log_begin_msg "Configuring gnome-panel-data..."
# live-initramfs script
-if [ -x /root/usr/sbin/laptop-detect ]; then
- if chroot /root laptop-detect; then
- live-reconfigure /root gnome-panel-data
+if [ -x /root/usr/sbin/laptop-detect ]
+then
+ if chroot /root laptop-detect
+ then
+ live-reconfigure /root gnome-panel-data
fi
fi
panel_version=$(chroot /root /usr/bin/dpkg-query -W --showformat='${Version}' gnome-panel-data 2>/dev/null) || panel_version=""
-if [ -n "$panel_version" ]; then
- chroot /root sudo -u "$USERNAME" gconftool-2 -s -t bool /apps/panel/global/disable_lock_screen true
+
+if [ -n "$panel_version" ]
+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
index c800bfb..e161da6 100755
--- a/scripts/live-bottom/22screensaver
+++ b/scripts/live-bottom/22screensaver
@@ -20,6 +20,11 @@ esac
# live-initramfs header
+if [ -n "${NOXSCREENSAVER}" ]
+then
+ exit 0
+fi
+
. /scripts/live-functions
log_begin_msg "Configuring screensaver..."
diff --git a/scripts/live-bottom/23etc_modules b/scripts/live-bottom/23etc_modules
index 82be075..b73a107 100755
--- a/scripts/live-bottom/23etc_modules
+++ b/scripts/live-bottom/23etc_modules
@@ -26,11 +26,11 @@ log_begin_msg "Preconfiguring /etc/modules..."
# live-initramfs script
-case "$DPKG_ARCH" in
# load the right modules
-powerpc|ppc64)
- echo snd_powermac >> /root/etc/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 353cda5..c6ec9cc 100755
--- a/scripts/live-bottom/23networking
+++ b/scripts/live-bottom/23networking
@@ -20,6 +20,11 @@ esac
# live-initramfs header
+if [ -n "${NONETWORKING}" ]
+then
+ exit 0
+fi
+
. /scripts/live-functions
log_begin_msg "Preconfiguring networking..."
@@ -28,13 +33,14 @@ log_begin_msg "Preconfiguring networking..."
IFFILE="/root/etc/network/interfaces"
-if [ "${STATICIP}" = "frommedia" -a -e "$IFFILE" ] ; then
- # will use existent /etc/network/interfaces
- log_end_msg
- exit 0
+if [ "${STATICIP}" = "frommedia" -a -e "$IFFILE" ]
+then
+ # will use existent /etc/network/interfaces
+ log_end_msg
+ exit 0
fi
-cat > "$IFFILE" <<EOF
+cat > "$IFFILE" << EOF
auto lo
iface lo inet loopback
@@ -43,14 +49,18 @@ EOF
udevtrigger
udevsettle
-if [ -z "${NETBOOT}" -a -n "${STATICIP}" -a "${STATICIP}" != "frommedia" ]; then
- parsed=$(echo "${STATICIP}" | sed -e 's/:/ /g')
- for ifline in ${parsed}; do
- ifname="$(echo ${ifline} | cut -f1 -d ',')"
- ifaddress="$(echo ${ifline} | cut -f2 -d ',')"
- ifnetmask="$(echo ${ifline} | cut -f3 -d ',')"
- ifgateway="$(echo ${ifline} | cut -f4 -d ',')"
- cat >> "$IFFILE" <<EOF
+if [ -z "${NETBOOT}" -a -n "${STATICIP}" -a "${STATICIP}" != "frommedia" ]
+then
+ parsed=$(echo "${STATICIP}" | sed -e 's/:/ /g')
+
+ for ifline in ${parsed}
+ do
+ ifname="$(echo ${ifline} | cut -f1 -d ',')"
+ ifaddress="$(echo ${ifline} | cut -f2 -d ',')"
+ ifnetmask="$(echo ${ifline} | cut -f3 -d ',')"
+ ifgateway="$(echo ${ifline} | cut -f4 -d ',')"
+
+cat >> "$IFFILE" << EOF
auto ${ifname}
iface ${ifname} inet static
address ${ifaddress}
@@ -58,39 +68,51 @@ iface ${ifname} inet static
gateway ${ifgateway}
EOF
- done
+
+ done
else
- if [ -z "${NETBOOT}" ]; then
- # default, dhcp assigned
- method="dhcp"
- else
- # make sure that the preconfigured interface would not get reassigned by dhcp
- # on startup by ifup script - otherwise our root fs might be disconnected!
- method="manual"
- fi
- # iterate the physical interfaces and add them to the interfaces list
- for interface in /sys/class/net/eth* /sys/class/net/ath* /sys/class/net/wlan*; do
- [ -e $interface ] || continue
- i="$(basename $interface)"
- cat >> "$IFFILE" <<EOF
+ if [ -z "${NETBOOT}" ]
+ then
+ # default, dhcp assigned
+ method="dhcp"
+ else
+ # make sure that the preconfigured interface would not get reassigned by dhcp
+ # on startup by ifup script - otherwise our root fs might be disconnected!
+ method="manual"
+ fi
+
+ # iterate the physical interfaces and add them to the interfaces list
+ for interface in /sys/class/net/eth* /sys/class/net/ath* /sys/class/net/wlan*
+ do
+ [ -e $interface ] || continue
+ i="$(basename $interface)"
+
+cat >> "$IFFILE" << EOF
auto $i
iface $i inet $method
EOF
- done
- if [ ! -f /root/etc/resolv.conf -a -f /netboot.config ] ; then
- # create a resolv.conf if it is not present
- cp /netboot.config /root/var/log/netboot.config
- rc_search=$(cat netboot.config | awk '/domain/{print $3}')
- rc_server0=$(cat netboot.config | awk '/dns0/{print $5}')
- rc_server1=$(cat netboot.config | awk '/dns0/{print $8}')
- rc_server0="nameserver ${rc_server0}"
- if [ "${rc_server1}" = "0.0.0.0" ]; then
- rc_server1=""
- else
- rc_server1="nameserver ${rc_server1}"
- fi
- cat > /root/etc/resolv.conf <<EOF
+
+ done
+
+ if [ ! -f /root/etc/resolv.conf -a -f /netboot.config ]
+ then
+ # create a resolv.conf if it is not present
+ cp /netboot.config /root/var/log/netboot.config
+
+ rc_search=$(cat netboot.config | awk '/domain/{print $3}')
+ rc_server0=$(cat netboot.config | awk '/dns0/{print $5}')
+ rc_server1=$(cat netboot.config | awk '/dns0/{print $8}')
+ rc_server0="nameserver ${rc_server0}"
+
+ if [ "${rc_server1}" = "0.0.0.0" ]
+ then
+ rc_server1=""
+ else
+ rc_server1="nameserver ${rc_server1}"
+ fi
+
+cat > /root/etc/resolv.conf << EOF
# /etc/resolv.conf
# Autogenerated by live-initramfs
search ${rc_search}
@@ -98,17 +120,21 @@ domain ${rc_search}
${rc_server0}
${rc_server1}
EOF
- cat /root/etc/resolv.conf >> /root/var/log/netboot.config
- fi
+
+ cat /root/etc/resolv.conf >> /root/var/log/netboot.config
+ fi
fi
-#for i in eth0 eth1 eth2 ath0 wlan0; do
-# grep -q "iface $i" $IFFILE && continue
-# cat >> "$IFFILE" <<EOF
+#for i in eth0 eth1 eth2 ath0 wlan0
+#do
+# grep -q "iface $i" $IFFILE && continue
+#
+#cat >> "$IFFILE" << EOF
#auto $i
#iface $i inet dhcp
#
#EOF
+#
#done
log_end_msg
diff --git a/scripts/live-bottom/24preseed b/scripts/live-bottom/24preseed
index 55fbfc3..f4b2db0 100755
--- a/scripts/live-bottom/24preseed
+++ b/scripts/live-bottom/24preseed
@@ -20,26 +20,36 @@ esac
# live-initramfs header
+if [ -n "${NOPRESEED}" ]
+then
+ exit 0
+fi
+
. /scripts/live-functions
log_begin_msg "Loading preseed file..."
# live-initramfs script
-if [ -e /preseed.cfg ]; then
- chroot /root debconf-set-selections < /preseed.cfg
+if [ -e /preseed.cfg ]
+then
+ chroot /root debconf-set-selections < /preseed.cfg
fi
-if [ -f "/root/${LOCATION}" ]; then
- chroot /root debconf-set-selections < "/root/${LOCATION}"
+if [ -f "/root/${LOCATION}" ]
+then
+ chroot /root debconf-set-selections < "/root/${LOCATION}"
fi
-if [ -n "${PRESEEDS}" ]; then
- for preseed in ${PRESEEDS}; do
- question="${preseed%%=*}"
- value="${preseed#*=}"
- live-preseed /root "${question}" "${value}"
- done
+if [ -n "${PRESEEDS}" ]
+then
+ for preseed in ${PRESEEDS}
+ do
+ question="${preseed%%=*}"
+ value="${preseed#*=}"
+
+ live-preseed /root "${question}" "${value}"
+ done
fi
log_end_msg
diff --git a/scripts/live-bottom/25configure_init b/scripts/live-bottom/25configure_init
index d007556..1ed4445 100755
--- a/scripts/live-bottom/25configure_init
+++ b/scripts/live-bottom/25configure_init
@@ -30,81 +30,104 @@ log_begin_msg "Setting up init..."
if [ -z "${NOAUTOLOGIN}" ]
then
+ if [ -n "$USERNAME" ]
+ then
+ if [ ! -z "${LIVE_GETTY}" ]
+ then
+ if echo "${DEFCONSOLE}" | grep -qs ttyS
+ then
+ # AUTOMATIC SERIAL CONSOLE #
+ PORT=$(echo "${DEFCONSOLE}" | \
+ sed -e 's%,.*%%')
+ SPEED=$(echo "${DEFCONSOLE}" | \
+ sed -e 's%ttyS[0-9]\+,%%' \
+ -e's%\([0-9]\+\).*%\1%')
+
+ if ! ( sed -n -e'/^[^#]/p' /root/etc/inittab | grep -qs ":respawn:/sbin/getty.*${PORT}" )
+ then
+ IDs="A B C D E F G H I J K L M N O P Q R S T Q U V V X Y Z 0 1 2 3 4 5 6 7 8 9"
+
+ for ID1 in $IDs
+ do
+ for ID2 in $IDs
+ do
+ ID="${ID1}${ID2}"
+
+ if ! grep "^${ID}:" /etc/inittab
+ then
+ #make sure it is not already in use
+ break 2
+ fi
+ done
+ done
+
+ echo "${ID}:2345:respawn:/sbin/live-getty -L ${PORT} ${SPEED} vt100" >> /root/etc/inittab
+ fi
+ fi
+
+ if [ -f /root/etc/inittab ]
+ then
+ sed -i -e'/^[^#]/s%respawn:/sbin/getty%respawn:/sbin/live-getty%' /root/etc/inittab
+ fi
+ else
+ if [ -f /root/etc/inittab ]
+ then
+ sed -i -e "s|^\([^:]*:[^:]*:[^:]*\):.*getty.*\<\(tty[0-9]*\).*$|\1:/bin/login -f $USERNAME </dev/\2 >/dev/\2 2>\&1|" /root/etc/inittab
+ fi
+
+ if [ "/root/etc/event.d/tty*" != "$(echo /root/etc/event.d/tty*)" ]
+ then
+ for f in /root/etc/event.d/tty*
+ do
+ sed -i -e "s|^respawn.*|respawn /bin/login -f $USERNAME </dev/$(basename $f) > /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 > /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
-if [ -n "$USERNAME" ]; then
- if [ ! -z "${LIVE_GETTY}" ]; then
- if echo "${DEFCONSOLE}" | grep -qs ttyS; then
- # AUTOMATIC SERIAL CONSOLE #
- PORT=$(echo "${DEFCONSOLE}" | \
- sed -e 's%,.*%%')
- SPEED=$(echo "${DEFCONSOLE}" | \
- sed -e 's%ttyS[0-9]\+,%%' \
- -e's%\([0-9]\+\).*%\1%')
- if ! ( sed -n -e'/^[^#]/p' /root/etc/inittab | grep -qs ":respawn:/sbin/getty.*${PORT}" ) ; then
- IDs="A B C D E F G H I J K L M N O P Q R S T Q U V V X Y Z 0 1 2 3 4 5 6 7 8 9"
- for ID1 in $IDs; do
- for ID2 in $IDs; do
- ID="${ID1}${ID2}"
- if ! grep "^${ID}:" /etc/inittab ; then
- #make sure it is not already in use
- break 2
- fi
- done
- done
- echo "${ID}:2345:respawn:/sbin/live-getty -L ${PORT} ${SPEED} vt100" \
- >>/root/etc/inittab
- fi
- fi
- if [ -f /root/etc/inittab ]; then
- sed -i -e'/^[^#]/s%respawn:/sbin/getty%respawn:/sbin/live-getty%' /root/etc/inittab
- fi
- else
- if [ -f /root/etc/inittab ]; then
- sed -i -e "s|^\([^:]*:[^:]*:[^:]*\):.*getty.*\<\(tty[0-9]*\).*$|\1:/bin/login -f $USERNAME </dev/\2 >/dev/\2 2>\&1|" /root/etc/inittab
- fi
- if [ "/root/etc/event.d/tty*" != "$(echo /root/etc/event.d/tty*)" ]; then
- for f in /root/etc/event.d/tty*; do
- sed -i -e "s|^respawn.*|respawn /bin/login -f $USERNAME </dev/$(basename $f) > /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 > /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
+# do not try to remove files if using file-rc
+if [ -d /etc/rc0.d ]
+then
+ # This has the nice side effect of the cron.{daily,weekly,monthly} jobs in
+ # /etc/crontab remaining disabled, yet also not run by anacron
+ if [ -x /root/etc/init.d/anacron ]
+ then
+ for f in /root/etc/rc?.d/S??anacron
+ do
+ mv ${f} ${f%/*}/K00anacron
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
-fi
+ # No point, really
+ rm -f /root/etc/rc?.d/[SK]??postfix
-# This has the nice side effect of the cron.{daily,weekly,monthly} jobs in
-# /etc/crontab remaining disabled, yet also not run by anacron
-if [ -x /root/etc/init.d/anacron ]; then
- for f in /root/etc/rc?.d/S??anacron; do
- mv ${f} ${f%/*}/K00anacron
- done
+ # Avoid clobbering the user's clock
+ rm -f /root/etc/rc?.d/K??hwclock.sh
fi
-# No point, really
-rm -f /root/etc/rc?.d/[SK]??postfix
-
-# Avoid clobbering the user's clock
-rm -f /root/etc/rc?.d/K??hwclock.sh
-
# Disable readahead since it doesn't play well with squashfs + unionfs
# use chmod instead of mv to not trigger unionfs bugs.
-if [ -e /root/sbin/readahead-list ]; then
- chmod -x /root/sbin/readahead-list
+if [ -e /root/sbin/readahead-list ]
+then
+ chmod -x /root/sbin/readahead-list
fi
log_end_msg
diff --git a/scripts/live-bottom/30accessibility b/scripts/live-bottom/30accessibility
index ac8d12e..17defbf 100755
--- a/scripts/live-bottom/30accessibility
+++ b/scripts/live-bottom/30accessibility
@@ -20,6 +20,11 @@ esac
# live-initramfs header
+if [ -n "${NOACCESSIBILITY}" ]
+then
+ exit 0
+fi
+
. /scripts/live-functions
log_begin_msg "Configuring accessibility options..."
@@ -28,95 +33,117 @@ log_begin_msg "Configuring accessibility options..."
gconf_version=$(chroot /root /usr/bin/dpkg-query -W --showformat='${Version}' gconf2 2>/dev/null) || gconf_version=""
-gct() {
- if [ "$gconf_version" ]; then
- chroot /root sudo -u "$USERNAME" gconftool-2 "$@"
- fi
+gct ()
+{
+ if [ "$gconf_version" ]
+ then
+ chroot /root sudo -u "$USERNAME" gconftool-2 "$@"
+ fi
}
-kderc_addtoprefixes() {
- if [ -e "/root/etc/kderc" ]; then
- sed -i "s|\\(prefixes=/usr/share/kubuntu-default-settings/kde-profile/default/\\)|\\1,$1|" /root/etc/kderc
- fi
+kderc_addtoprefixes ()
+{
+ if [ -e "/root/etc/kderc" ]
+ then
+ sed -i "s|\\(prefixes=/usr/share/kubuntu-default-settings/kde-profile/default/\\)|\\1,$1|" /root/etc/kderc
+ fi
}
case ${ACCESS} in
- # Lesser Visual Impairment
- access=v1)
- gct -s -t string /desktop/gnome/interface/gtk_theme HighContrastLargePrint
- gct -s -t string /desktop/gnome/interface/icon_theme HighContrast
- gct -s -t string /desktop/gnome/interface/monospace_font_name "monospace 18"
- gct -s -t string /desktop/gnome/interface/font_name "sans 18"
- gct -s -t string /apps/metacity/general/theme Atlanta
- gct -s -t string /desktop/gnome/background/picture_filename ""
- gct -s -t string /desktop/gnome/background/picture_options none
- gct -s -t string /desktop/gnome/background/primary_color \#666666
- gct -s -t string /desktop/gnome/background/secondary_color \#7F7F7F
- gct -s -t string /desktop/gnome/background/color_shading_type solid
- gct -s -t int /desktop/gnome/peripherals/mouse/cursor_size 48
- gct -s -t string /desktop/gnome/peripherals/mouse/cursor_theme whiteglass
-
- kderc_addtoprefixes /usr/share/kubuntu-default-settings/kde-profile/lesser-visual-impairment/
- if [ -d /root/usr/share/xubuntu-default-settings/accessibility ]; then
- cp -a /root/usr/share/xubuntu-default-settings/accessibility/* /root/etc/xdg/
- fi
- ;;
- # Moderate Visual Impairment
- access=v2)
- gct -s -t bool /desktop/gnome/interface/accessibility true
- gct -s -t bool /desktop/gnome/applications/at/visual/startup true
- if [ -e /root/usr/share/pycentral/gnome-orca/site-packages/orca/settings.py ]; then
- sed -i '/^enableSpeech\W/ s/True/False/;/^enableMagnifier/ s/False/True/' /root/usr/share/pycentral/gnome-orca/site-packages/orca/settings.py
- fi
- gct -s -t bool /apps/gksu/disable-grab true
- kderc_addtoprefixes /usr/share/kubuntu-default-settings/kde-profile/lesser-visual-impairment/,/usr/share/kubuntu-default-settings/kde-profile/moderate-visual-impairment/
- ;;
- # Blindness
- access=v3)
- # Disabled for now, until we know eSpeak works.
- #gct -s -t bool /desktop/gnome/sound/enable_esd false
- gct -s -t bool /desktop/gnome/interface/accessibility true
- gct -s -t bool /desktop/gnome/applications/at/visual/startup true
- gct -s -t bool /apps/gksu/disable-grab true
- ;;
- # Braille
- braille=ask)
- gct -s -t bool /desktop/gnome/interface/accessibility true
- gct -s -t bool /desktop/gnome/applications/at/visual/startup true
- if [ -e /root/usr/share/pycentral/gnome-orca/site-packages/orca/settings.py ]; then
- sed -i '/^enableSpeech\W/ s/True/False/;/^enableBraille/ s/False/True/' /root/usr/share/pycentral/gnome-orca/site-packages/orca/settings.py
- fi
- gct -s -t bool /apps/gksu/disable-grab true
- ;;
- # Minor Motor Difficulties
- access=m1)
- gct -s -t bool /desktop/gnome/accessibility/keyboard/enable true
- gct -s -t bool /desktop/gnome/accessibility/keyboard/mousekeys_enable true
- gct -s -t bool /desktop/gnome/accessibility/keyboard/stickykeys_enable true
- gct -s -t bool /desktop/gnome/accessibility/keyboard/stickykeys_modifier_beep true
- gct -s -t bool /desktop/accessibility/gnome/keyboard/stickykeys_two_key_off false
- gct -s -t bool /desktop/gnome/peripherals/keyboard/repeat true
- gct -s -t int /desktop/gnome/peripherals/keyboard/delay 700
- gct -s -t int /desktop/gnome/peripherals/keyboard/rate 10
- gct -s -t bool /apps/gksu/disable-grab true
- kderc_addtoprefixes /usr/share/kubuntu-default-settings/kde-profile/minor-motor-difficulties/
- if [ -e /root/etc/xdg/xfce4/mcs_settings/keyboard.xml ]; then
- sed -i 's/0/1/' /root/etc/xdg/xfce4/mcs_settings/keyboard.xml
- fi
- ;;
- # Motor Difficulties - pointing devices
- access=m2)
- gct -s -t bool /desktop/gnome/accessibility/keyboard/enable true
- gct -s -t bool /desktop/gnome/interface/accessibility true
- gct -s -t bool /desktop/gnome/accessibility/keyboard/stickykeys_enable true
- gct -s -t bool /desktop/gnome/accessibility/keyboard/stickykeys_modifier_beep false
- gct -s -t bool /desktop/accessibility/gnome/keyboard/stickykeys_two_key_off false
- gct -s -t list --list-type=string /desktop/gnome/accessibility/startup/exec_ats [onboard]
-
- kderc_addtoprefixes /usr/share/kubuntu-default-settings/kde-profile/minor-motor-difficulties/,/usr/share/kubuntu-default-settings/kde-profile/motor-difficulties-pointing-devices/
- if [ -e /root/etc/xdg/xfce4/mcs_settings/keyboard.xml ]; then
- sed -i '/Sticky/ s/0/1/' /root/etc/xdg/xfce4/mcs_settings/keyboard.xml
- fi
- ;;
+ access=v1)
+ # Lesser Visual Impairment
+ gct -s -t string /desktop/gnome/interface/gtk_theme HighContrastLargePrint
+ gct -s -t string /desktop/gnome/interface/icon_theme HighContrast
+ gct -s -t string /desktop/gnome/interface/monospace_font_name "monospace 18"
+ gct -s -t string /desktop/gnome/interface/font_name "sans 18"
+ gct -s -t string /apps/metacity/general/theme Atlanta
+ gct -s -t string /desktop/gnome/background/picture_filename ""
+ gct -s -t string /desktop/gnome/background/picture_options none
+ gct -s -t string /desktop/gnome/background/primary_color \#666666
+ gct -s -t string /desktop/gnome/background/secondary_color \#7F7F7F
+ gct -s -t string /desktop/gnome/background/color_shading_type solid
+ gct -s -t int /desktop/gnome/peripherals/mouse/cursor_size 48
+ gct -s -t string /desktop/gnome/peripherals/mouse/cursor_theme whiteglass
+
+ kderc_addtoprefixes /usr/share/kubuntu-default-settings/kde-profile/lesser-visual-impairment/
+
+ if [ -d /root/usr/share/xubuntu-default-settings/accessibility ]
+ then
+ cp -a /root/usr/share/xubuntu-default-settings/accessibility/* /root/etc/xdg/
+ fi
+ ;;
+
+ access=v2)
+ # Moderate Visual Impairment
+ gct -s -t bool /desktop/gnome/interface/accessibility true
+ gct -s -t bool /desktop/gnome/applications/at/visual/startup true
+ gct -s -t bool /apps/gksu/disable-grab true
+
+ if [ -e /root/usr/share/pycentral/gnome-orca/site-packages/orca/settings.py ]
+ then
+ sed -i '/^enableSpeech\W/ s/True/False/;/^enableMagnifier/ s/False/True/' /root/usr/share/pycentral/gnome-orca/site-packages/orca/settings.py
+ fi
+
+ kderc_addtoprefixes /usr/share/kubuntu-default-settings/kde-profile/lesser-visual-impairment/,/usr/share/kubuntu-default-settings/kde-profile/moderate-visual-impairment/
+ ;;
+
+ access=v3)
+ # Blindness
+ # Disabled for now, until we know eSpeak works.
+ #gct -s -t bool /desktop/gnome/sound/enable_esd false
+ gct -s -t bool /desktop/gnome/interface/accessibility true
+ gct -s -t bool /desktop/gnome/applications/at/visual/startup true
+ gct -s -t bool /apps/gksu/disable-grab true
+ ;;
+
+ braille=ask)
+ # Braille
+ gct -s -t bool /desktop/gnome/interface/accessibility true
+ gct -s -t bool /desktop/gnome/applications/at/visual/startup true
+ gct -s -t bool /apps/gksu/disable-grab true
+
+ if [ -e /root/usr/share/pycentral/gnome-orca/site-packages/orca/settings.py ]
+ then
+ sed -i '/^enableSpeech\W/ s/True/False/;/^enableBraille/ s/False/True/' /root/usr/share/pycentral/gnome-orca/site-packages/orca/settings.py
+ fi
+ ;;
+
+ access=m1)
+ # Minor Motor Difficulties
+ gct -s -t bool /desktop/gnome/accessibility/keyboard/enable true
+ gct -s -t bool /desktop/gnome/accessibility/keyboard/mousekeys_enable true
+ gct -s -t bool /desktop/gnome/accessibility/keyboard/stickykeys_enable true
+ gct -s -t bool /desktop/gnome/accessibility/keyboard/stickykeys_modifier_beep true
+ gct -s -t bool /desktop/accessibility/gnome/keyboard/stickykeys_two_key_off false
+ gct -s -t bool /desktop/gnome/peripherals/keyboard/repeat true
+ gct -s -t int /desktop/gnome/peripherals/keyboard/delay 700
+ gct -s -t int /desktop/gnome/peripherals/keyboard/rate 10
+ gct -s -t bool /apps/gksu/disable-grab true
+
+ kderc_addtoprefixes /usr/share/kubuntu-default-settings/kde-profile/minor-motor-difficulties/
+
+ if [ -e /root/etc/xdg/xfce4/mcs_settings/keyboard.xml ]
+ then
+ sed -i 's/0/1/' /root/etc/xdg/xfce4/mcs_settings/keyboard.xml
+ fi
+ ;;
+
+ access=m2)
+ # Motor Difficulties - pointing devices
+ gct -s -t bool /desktop/gnome/accessibility/keyboard/enable true
+ gct -s -t bool /desktop/gnome/interface/accessibility true
+ gct -s -t bool /desktop/gnome/accessibility/keyboard/stickykeys_enable true
+ gct -s -t bool /desktop/gnome/accessibility/keyboard/stickykeys_modifier_beep false
+ gct -s -t bool /desktop/accessibility/gnome/keyboard/stickykeys_two_key_off false
+ gct -s -t list --list-type=string /desktop/gnome/accessibility/startup/exec_ats [onboard]
+
+ kderc_addtoprefixes /usr/share/kubuntu-default-settings/kde-profile/minor-motor-difficulties/,/usr/share/kubuntu-default-settings/kde-profile/motor-difficulties-pointing-devices/
+
+ if [ -e /root/etc/xdg/xfce4/mcs_settings/keyboard.xml ]
+ then
+ sed -i '/Sticky/ s/0/1/' /root/etc/xdg/xfce4/mcs_settings/keyboard.xml
+ fi
+ ;;
esac
+
log_end_msg
diff --git a/scripts/live-bottom/31disable_update_notifier b/scripts/live-bottom/31disable_update_notifier
index 976a3d3..7a6fef8 100755
--- a/scripts/live-bottom/31disable_update_notifier
+++ b/scripts/live-bottom/31disable_update_notifier
@@ -20,6 +20,11 @@ esac
# live-initramfs header
+if [ -n "${NOUPDATENOTIFIER}" ]
+then
+ exit 0
+fi
+
. /scripts/live-functions
log_begin_msg "Disabling update-notifier..."
@@ -31,6 +36,7 @@ log_begin_msg "Disabling update-notifier..."
# report handling.
chroot /root dpkg-divert --add --rename --quiet \
/usr/lib/update-notifier/apt-check
+
ln -s /bin/true /root/usr/lib/update-notifier/apt-check
# For KDE, adept_notifier's only useful function at the moment is an
diff --git a/scripts/live-bottom/32disable_hibernation b/scripts/live-bottom/32disable_hibernation
index b75dbd9..0965c73 100755
--- a/scripts/live-bottom/32disable_hibernation
+++ b/scripts/live-bottom/32disable_hibernation
@@ -20,6 +20,11 @@ esac
# live-initramfs header
+if [ -n "${NOPOWERMANAGEMENT}" ]
+then
+ exit 0
+fi
+
. /scripts/live-functions
log_begin_msg "Configuring power management..."
@@ -27,15 +32,18 @@ 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" ]; then
-# live-reconfigure /root gnome-power-manager
- chroot /root sudo -u "$USERNAME" gconftool-2 -s -t bool /apps/gnome-power-manager/can_hibernate false
- chroot /root sudo -u "$USERNAME" gconftool-2 -s -t bool /apps/gnome-power-manager/can_suspend false
+
+if [ -n "$gpm_version" ]
+then
+ #live-reconfigure /root gnome-power-manager
+ chroot /root sudo -u "$USERNAME" gconftool-2 -s -t bool /apps/gnome-power-manager/can_hibernate false
+ chroot /root sudo -u "$USERNAME" gconftool-2 -s -t bool /apps/gnome-power-manager/can_suspend false
fi
-if [ -d /root/usr/share/kubuntu-default-settings/kde-profile/default/share/config ]; then
- echo "disableSuspend=1" >> /root/usr/share/kubuntu-default-settings/kde-profile/default/share/config/power-managerrc
- echo "disableHibernate=1" >> /root/usr/share/kubuntu-default-settings/kde-profile/default/share/config/power-managerrc
+if [ -d /root/usr/share/kubuntu-default-settings/kde-profile/default/share/config ]
+then
+ echo "disableSuspend=1" >> /root/usr/share/kubuntu-default-settings/kde-profile/default/share/config/power-managerrc
+ echo "disableHibernate=1" >> /root/usr/share/kubuntu-default-settings/kde-profile/default/share/config/power-managerrc
fi
log_end_msg
diff --git a/scripts/live-bottom/33enable_apport_crashes b/scripts/live-bottom/33enable_apport_crashes
index 0f177ab..747ba26 100755
--- a/scripts/live-bottom/33enable_apport_crashes
+++ b/scripts/live-bottom/33enable_apport_crashes
@@ -20,6 +20,11 @@ esac
# live-initramfs header
+if [ -n "${NOPROGRAMCRASHES}" ]
+then
+ exit 0
+fi
+
. /scripts/live-functions
log_begin_msg "Enabling notifications about program crashes..."
@@ -27,8 +32,10 @@ log_begin_msg "Enabling notifications about program crashes..."
# live-initramfs script
update_notifier_version=$(chroot /root dpkg-query -W --showformat='${Version}' update-notifier 2>/dev/null) || update_notifier_version=""
-if [ -n "$update_notifier_version" ]; then
- chroot /root sudo -u "$USERNAME" gconftool-2 -t bool -s /apps/update-notifier/show_apport_crashes true
+
+if [ -n "$update_notifier_version" ]
+then
+ chroot /root sudo -u "$USERNAME" gconftool-2 -t bool -s /apps/update-notifier/show_apport_crashes true
fi
log_end_msg
diff --git a/scripts/live-bottom/34disable_kpersonalizer b/scripts/live-bottom/34disable_kpersonalizer
new file mode 100755
index 0000000..e19cf2a
--- /dev/null
+++ b/scripts/live-bottom/34disable_kpersonalizer
@@ -0,0 +1,51 @@
+#!/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 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
+
+log_end_msg
diff --git a/scripts/live-bottom/34disable_kwallet b/scripts/live-bottom/34disable_kwallet
index 767f9f8..79c895a 100755
--- a/scripts/live-bottom/34disable_kwallet
+++ b/scripts/live-bottom/34disable_kwallet
@@ -20,6 +20,11 @@ esac
# live-initramfs header
+if [ -n "${NOKWALLET}" ]
+then
+ exit 0
+fi
+
. /scripts/live-functions
log_begin_msg "Disabling kwallet..."
diff --git a/scripts/live-bottom/35fix_language_selector b/scripts/live-bottom/35fix_language_selector
index 1c9af0a..126a5b2 100755
--- a/scripts/live-bottom/35fix_language_selector
+++ b/scripts/live-bottom/35fix_language_selector
@@ -20,19 +20,25 @@ 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
-
+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
+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/38disable_restricted_manager b/scripts/live-bottom/38disable_restricted_manager
index 2f2db35..2a6f1ca 100755
--- a/scripts/live-bottom/38disable_restricted_manager
+++ b/scripts/live-bottom/38disable_restricted_manager
@@ -1,9 +1,8 @@
#!/bin/sh
PREREQ=""
-DESCRIPTION="Disabling restricted-manager..."
-. /scripts/casper-functions
+. /scripts/live-functions
prereqs()
{
@@ -18,10 +17,14 @@ prereqs)
;;
esac
-log_begin_msg "$DESCRIPTION"
+if [ -n "${NORESTRICTEDMANAGER}" ]
+then
+ exit 0
+fi
-rm -f /root/etc/xdg/autostart/restricted-manager.desktop
+log_begin_msg "Disabling restricted-manager..."
+rm -f /root/etc/xdg/autostart/restricted-manager.desktop
rm -f /root/etc/xdg/autostart/restricted-manager-kde.desktop
log_end_msg
diff --git a/scripts/live-bottom/40install_driver_updates b/scripts/live-bottom/40install_driver_updates
index d6f149a..762a084 100755
--- a/scripts/live-bottom/40install_driver_updates
+++ b/scripts/live-bottom/40install_driver_updates
@@ -22,14 +22,15 @@ esac
. /scripts/live-functions
-log_begin_msg "Installing driver updates..."
-
# live-initramfs script
-if [ ! -d /tmp/driver-updates ]; then
+if [ ! -d /tmp/driver-updates ]
+then
exit 0
fi
+log_begin_msg "Installing driver updates..."
+
install_dir=/var/cache/driver-updates
mkdir "/root$install_dir"
@@ -37,11 +38,15 @@ cp -a /tmp/driver-updates/*.deb "/root$install_dir/"
# We cannot leave packages in a bad state. So if the install fails, remove
# it. This will get caught in live.log.
-for deb in "/root$install_dir"/*; do
+for deb in "/root$install_dir"/*
+do
[ -f "$deb" ] || continue
+
debbase="${deb##*/}"
- if ! chroot /root dpkg -i "$install_dir/$debbase"; then
- chroot /root dpkg -P "${debbase%%_*}"
+
+ if ! chroot /root dpkg -i "$install_dir/$debbase"
+ then
+ chroot /root dpkg -P "${debbase%%_*}"
fi
done
diff --git a/scripts/live-bottom/41apt_cdrom b/scripts/live-bottom/41apt_cdrom
index bbfa845..fdde34d 100755
--- a/scripts/live-bottom/41apt_cdrom
+++ b/scripts/live-bottom/41apt_cdrom
@@ -20,6 +20,11 @@ esac
# live-initramfs header
+if [ -n "${NOAPTCDROM}" ]
+then
+ exit 0
+fi
+
. /scripts/live-functions
log_begin_msg "Adding APT-CDROM source..."