mirror of
https://pagure.io/fedora-kickstarts.git
synced 2024-12-22 05:35:26 +00:00
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
This commit is contained in:
parent
cafd01a101
commit
c153a50c0b
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user