summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2007-09-23 14:46:39 +0200
committerDaniel Baumann <daniel@debian.org>2011-03-09 17:31:05 +0100
commit8363c6c595d8f1a3fdd6af8a4965b628d9ce4088 (patch)
tree69dd34b7ae62bb2a48f0927869824408c8fae2dc /scripts
parent74f8c4c954a06ebc99be06ad8b77e0ef0880b30e (diff)
downloadlive-boot-8363c6c595d8f1a3fdd6af8a4965b628d9ce4088.tar.gz
live-boot-8363c6c595d8f1a3fdd6af8a4965b628d9ce4088.zip
Adding live-initramfs 1.91.3-1.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/live28
-rwxr-xr-xscripts/live-bottom/02_timezone16
-rwxr-xr-xscripts/live-bottom/12fstab10
3 files changed, 49 insertions, 5 deletions
diff --git a/scripts/live b/scripts/live
index 26fde4d..5397837 100755
--- a/scripts/live
+++ b/scripts/live
@@ -95,10 +95,12 @@ parse_cmdline ()
kmodel=*|console-setup/modelcode=*)
KMODEL=${x#*=}
+ export KMODEL
;;
koptions=*)
KOPTIONS=${x#koptions=}
+ export KOPTIONS
;;
live-getty)
@@ -156,6 +158,11 @@ parse_cmdline ()
export NOXAUTOLOGIN
;;
+ nofastboot)
+ NOFASTBOOT="Yes"
+ export NOFASTBOOT
+ ;;
+
nopersistent)
PERSISTENT=""
export PERSISTENT
@@ -194,6 +201,11 @@ parse_cmdline ()
export SHOWMOUNTS
;;
+ timezone=*)
+ TIMEZONE="${x#timezone=}"
+ export TIMEZONE
+ ;;
+
todisk=*)
TODISK=${x#todisk=}
export TODISK
@@ -204,6 +216,11 @@ parse_cmdline ()
export TORAM
;;
+ union=*)
+ UNIONTYPE="${x#union=}"
+ export UNIONTYPE
+ ;;
+
xdebconf)
XDEBCONF="Yes"
export XDEBCONF
@@ -233,6 +250,13 @@ parse_cmdline ()
if [ -z "${MODULE}" ]
then
MODULE="filesystem"
+ export MODULE
+ fi
+
+ if [ -z "${UNIONTYPE}" ]
+ then
+ UNIONTYPE="unionfs"
+ export UNIONTYPE
fi
}
@@ -520,7 +544,7 @@ setup_unionfs() {
image_directory="$1"
rootmnt="$2"
- modprobe "${MP_QUIET}" -b unionfs
+ modprobe "${MP_QUIET}" -b ${UNIONTYPE}
# run-init can't deal with images in a subdir, but we're going to
# move all of these away before it runs anyway. No, we're not,
@@ -604,7 +628,7 @@ setup_unionfs() {
mount ${cowdevice} -t ${cow_fstype} -o rw /cow || panic "Can not mount $cowdevice on /cow"
- mount -t unionfs -o dirs=/cow=rw:$rofsstring unionfs "$rootmnt" || panic "Unionfs mount failed"
+ mount -t ${UNIONTYPE} -o dirs=/cow=rw:$rofsstring ${UNIONTYPE} "$rootmnt" || panic "${UNIONTYPE} mount failed"
# Adding other custom mounts
if [ -n "${PERSISTENT}" ]; then
diff --git a/scripts/live-bottom/02_timezone b/scripts/live-bottom/02_timezone
index bafc426..10b634e 100755
--- a/scripts/live-bottom/02_timezone
+++ b/scripts/live-bottom/02_timezone
@@ -26,6 +26,20 @@ log_begin_msg "Setting timezone..."
# live-initramfs script
-cp -f /root/usr/share/zoneinfo/UTC /root/etc/localtime
+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
log_end_msg
diff --git a/scripts/live-bottom/12fstab b/scripts/live-bottom/12fstab
index 389f53e..9c8bfd7 100755
--- a/scripts/live-bottom/12fstab
+++ b/scripts/live-bottom/12fstab
@@ -29,10 +29,16 @@ log_begin_msg "Configuring fstab..."
FSTAB=/root/etc/fstab
cat > $FSTAB <<EOF
-unionfs / unionfs rw 0 0
+${UNIONTYPE} / ${UNIONTYPE} rw 0 0
tmpfs /tmp tmpfs nosuid,nodev 0 0
EOF
-rm -f /root/etc/rcS.d/S*checkroot.sh
+# disabled for now
+#rm -f /root/etc/rcS.d/S*checkroot.sh
+
+if [ "${NOFASTBOOT}" != "Yes" ]
+then
+ touch root/fastboot
+fi
log_end_msg