diff options
author | Daniel Baumann <daniel@debian.org> | 2007-09-23 14:46:37 +0200 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2011-03-09 17:31:05 +0100 |
commit | 0a1b827c113b85f48bcd58e64ccd94d094b9bd8a (patch) | |
tree | d83a31c0fdd90c55379666f5962df9c1ea6e43d4 /scripts | |
parent | ccea277caf476cdfef4c0f953df5a97062d8be42 (diff) | |
download | live-boot-0a1b827c113b85f48bcd58e64ccd94d094b9bd8a.tar.gz live-boot-0a1b827c113b85f48bcd58e64ccd94d094b9bd8a.zip |
Adding live-initramfs 1.87.5-1.
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/live | 8 | ||||
-rwxr-xr-x | scripts/live-bottom/10adduser | 6 | ||||
-rwxr-xr-x | scripts/live-bottom/13swap | 10 | ||||
-rwxr-xr-x | scripts/live-bottom/14locales | 2 | ||||
-rwxr-xr-x | scripts/live-bottom/15autologin | 2 | ||||
-rwxr-xr-x | scripts/live-bottom/20xconfig | 2 | ||||
-rwxr-xr-x | scripts/live-bottom/42apt_upgrade | 49 |
7 files changed, 65 insertions, 14 deletions
diff --git a/scripts/live b/scripts/live index 73a965e..86aaddc 100755 --- a/scripts/live +++ b/scripts/live @@ -76,7 +76,7 @@ parse_cmdline () export PERSISTENT="" ;; ip*) STATICIP=${x#ip=} - if [ "${STATICIP}" == "" ]; then + if [ "${STATICIP}" = "" ]; then STATICIP="frommedia" fi export STATICIP ;; @@ -106,6 +106,8 @@ parse_cmdline () export MODULE=${x#module=} ;; preseed/file=*|file=*) export LOCATION="${x#*=}" ;; + upgrade) + export UPGRADE="Yes" ;; */*=*) question="${x%%=*}" value="${x#*=}" @@ -118,10 +120,10 @@ parse_cmdline () # sort of compatibility with netboot.h from linux docs if [ -z "${NETBOOT}" ]; then - if [ "${ROOT}" == "/dev/nfs" ]; then + if [ "${ROOT}" = "/dev/nfs" ]; then NETBOOT="nfs" export NETBOOT - elif [ "${ROOT}" == "/dev/cifs" ]; then + elif [ "${ROOT}" = "/dev/cifs" ]; then NETBOOT="cifs" export NETBOOT fi diff --git a/scripts/live-bottom/10adduser b/scripts/live-bottom/10adduser index f4c42f8..378f016 100755 --- a/scripts/live-bottom/10adduser +++ b/scripts/live-bottom/10adduser @@ -26,7 +26,7 @@ log_begin_msg "Adding live session user..." # live-initramfs script -if [ "${BUILD_SYSTEM}" == "Debian" ]; then +if [ "${BUILD_SYSTEM}" = "Debian" ]; then user_crypted="8Ab05sVQ4LLps" # as in `echo "live" | mkpasswd -s` else user_crypted="U6aMy0wojraho" # "ubuntu" @@ -41,7 +41,7 @@ set passwd/username $USERNAME set passwd/user-uid 999 EOF -if [ "${BUILD_SYSTEM}" == "Debian" ]; then +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 @@ -62,7 +62,7 @@ if [ -z "${NOSUDO}" ] then if [ -f /root/etc/sudoers ]; then - if [ "${BUILD_SYSTEM}" == "Ubuntu" ]; 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) diff --git a/scripts/live-bottom/13swap b/scripts/live-bottom/13swap index 4f6be9d..8b47a00 100755 --- a/scripts/live-bottom/13swap +++ b/scripts/live-bottom/13swap @@ -20,6 +20,11 @@ esac # live-initramfs header +if [ -n "${NOSWAP}" ] +then + exit 0 +fi + . /scripts/live-functions log_begin_msg "Setting up swap..." @@ -28,11 +33,6 @@ log_begin_msg "Setting up swap..." FSTAB=/root/etc/fstab -if [ -n "${NOSWAP}" ] -then - exit 0 -fi - devices="" for device in /dev/[hs]d[a-z][0-9]*; do if ! [ -b "$device" ]; then diff --git a/scripts/live-bottom/14locales b/scripts/live-bottom/14locales index 3fe04c7..bdb1d8b 100755 --- a/scripts/live-bottom/14locales +++ b/scripts/live-bottom/14locales @@ -70,7 +70,7 @@ if [ "${set_locale}" ]; then really_export LANG - if [ "${BUILD_SYSTEM}" == "Ubuntu" ]; then + 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}" diff --git a/scripts/live-bottom/15autologin b/scripts/live-bottom/15autologin index b24d428..f15f033 100755 --- a/scripts/live-bottom/15autologin +++ b/scripts/live-bottom/15autologin @@ -36,7 +36,7 @@ else fi if chroot /root [ -f ${GDMCONF} ]; then - if [ "${BUILD_SYSTEM}" == "Debian" ]; then + if [ "${BUILD_SYSTEM}" = "Debian" ]; then # true hack ! -- nohar chroot /root cp /usr/share/gdm/defaults.conf /etc/gdm/gdm.conf fi diff --git a/scripts/live-bottom/20xconfig b/scripts/live-bottom/20xconfig index 161215b..1105e4a 100755 --- a/scripts/live-bottom/20xconfig +++ b/scripts/live-bottom/20xconfig @@ -43,7 +43,7 @@ if [ -n "${XDEBCONF}" -a -x /root/usr/sbin/xdebconfigurator ]; then chroot /root /usr/sbin/xdebconfigurator fi -if [ "${BUILD_SYSTEM}" == "Ubuntu" ]; then +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 diff --git a/scripts/live-bottom/42apt_upgrade b/scripts/live-bottom/42apt_upgrade new file mode 100755 index 0000000..96ec814 --- /dev/null +++ b/scripts/live-bottom/42apt_upgrade @@ -0,0 +1,49 @@ +#!/bin/sh + +#set -e + +# initramfs-tools header + +PREREQ="" + +prereqs() +{ + echo "${PREREQ}" +} + +case "${1}" in + prereqs) + prereqs + exit 0 + ;; +esac + +# live-initramfs header + +if [ -z "${UPGRADE}" ] +then + exit 0 +fi + +. /scripts/live-functions + +log_begin_msg "Enabling apt upgrade..." + +# live-initramfs script + +cat > /root/etc/init.d/apt-upgrade << EOF +#!/bin/sh + +NOTTY="-q -y -o DPkg::Options::=--force-confdef" +UPGRADEOPTS="dist-upgrade" +DEBIAN_FRONTEND="noninteractive" +export DEBIAN_FRONTEND + +apt-get -q=2 update && apt-get \${NOTTY} -u \${UPGRADEOPTS} +EOF + +chmod 0755 /root/etc/init.d/apt-upgrade + +chroot /root update-rc.d apt-upgrade defaults 99 + +log_end_msg |