mirror of
https://pagure.io/fedora-kickstarts.git
synced 2024-12-27 05:23:08 +00:00
Ensure we mount persistent home and swap always (#470317)
We weren't running any of this if you had persistence configured and you had already booted. We should at least mount the persistent /home and turn on swap for that case as well as doing our tmpfs mounts
This commit is contained in:
parent
4587813336
commit
59869f2b09
@ -99,10 +99,14 @@ cat > /etc/rc.d/init.d/livesys << EOF
|
||||
|
||||
. /etc/init.d/functions
|
||||
|
||||
if ! strstr "\`cat /proc/cmdline\`" liveimg || [ "\$1" != "start" ] || [ -e /.liveimg-configured ] ; then
|
||||
if ! strstr "\`cat /proc/cmdline\`" liveimg || [ "\$1" != "start" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ -e /.liveimg-configured ] ; then
|
||||
configdone=1
|
||||
fi
|
||||
|
||||
exists() {
|
||||
which \$1 >/dev/null 2>&1 || return
|
||||
\$*
|
||||
@ -183,6 +187,17 @@ if ! strstr "\`cat /proc/cmdline\`" nopersistenthome && [ -n "\$homedev" ] ; the
|
||||
action "Mounting persistent /home" mountPersistentHome
|
||||
fi
|
||||
|
||||
# make it so that we don't do writing to the overlay for things which
|
||||
# are just tmpdirs/caches
|
||||
mount -t tmpfs -o mode=0755 varcacheyum /var/cache/yum
|
||||
mount -t tmpfs tmp /tmp
|
||||
mount -t tmpfs vartmp /var/tmp
|
||||
[ -x /sbin/restorecon ] && /sbin/restorecon /var/cache/yum /tmp /var/tmp >/dev/null 2>&1
|
||||
|
||||
if [ -n "\$configdone" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# add fedora user with no passwd
|
||||
action "Adding live user" useradd \$USERADDARGS -c "Live System User" liveuser
|
||||
passwd -d liveuser > /dev/null
|
||||
@ -220,13 +235,6 @@ chkconfig --level 345 anacron off 2>/dev/null
|
||||
chkconfig --level 345 readahead_early off 2>/dev/null
|
||||
chkconfig --level 345 readahead_later off 2>/dev/null
|
||||
|
||||
# make it so that we don't do writing to the overlay for things which
|
||||
# are just tmpdirs/caches
|
||||
mount -t tmpfs -o mode=0755 varcacheyum /var/cache/yum
|
||||
mount -t tmpfs tmp /tmp
|
||||
mount -t tmpfs vartmp /var/tmp
|
||||
[ -x /sbin/restorecon ] && /sbin/restorecon /var/cache/yum /tmp /var/tmp >/dev/null 2>&1
|
||||
|
||||
# Stopgap fix for RH #217966; should be fixed in HAL instead
|
||||
touch /media/.hal-mtab
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user