fedora-live-base.ks | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
New commits:
commit c153a50c0bb1d09de91cea293184653f4d9000c8
Author: Jeremy Katz <katzj(a)redhat.com>
Date: Fri Mar 6 16:54:17 2009 -0500
Parameterize LiveOS so that we can support multiple images on a stick
Booting with live_dir=foo will now look in foo/ rather than LiveOS/
for the live image bits and pieces
diff --git a/fedora-live-base.ks b/fedora-live-base.ks
index bd26e4b..db939ab 100644
--- a/fedora-live-base.ks
+++ b/fedora-live-base.ks
@@ -121,6 +121,14 @@ if [ -b \`readlink -f /dev/live\` ]; then
mount -o ro /dev/live /mnt/live 2>/dev/null || mount /dev/live /mnt/live
fi
+livedir="LiveOS"
+for arg in \`cat /proc/cmdline\` ; do
+ if [ "\${arg##live_dir=}" != "\${arg}" ]; then
+ livedir=\${arg##live_dir=}
+ return
+ fi
+done
+
# enable swaps unless requested otherwise
swaps=\`blkid -t TYPE=swap -o device\`
if ! strstr "\`cat /proc/cmdline\`" noswap && [ -n "\$swaps"
] ; then
@@ -128,8 +136,8 @@ if ! strstr "\`cat /proc/cmdline\`" noswap && [ -n
"\$swaps" ] ; then
action "Enabling swap partition \$s" swapon \$s
done
fi
-if ! strstr "\`cat /proc/cmdline\`" noswap && [ -f
/mnt/live/LiveOS/swap.img ] ; then
- action "Enabling swap file" swapon /mnt/live/LiveOS/swap.img
+if ! strstr "\`cat /proc/cmdline\`" noswap && [ -f
/mnt/live/\${livedir}/swap.img ] ; then
+ action "Enabling swap file" swapon /mnt/live/\${livedir}/swap.img
fi
mountPersistentHome() {
@@ -179,8 +187,8 @@ findPersistentHome() {
if strstr "\`cat /proc/cmdline\`" persistenthome= ; then
findPersistentHome
-elif [ -e /mnt/live/LiveOS/home.img ]; then
- homedev=/mnt/live/LiveOS/home.img
+elif [ -e /mnt/live/\${livedir}/home.img ]; then
+ homedev=/mnt/live/\${livedir}/home.img
fi
# if we have a persistent /home, then we want to go ahead and mount it
Show replies by date