forked from srbala/fedora-kickstarts
update system disablement for systemd, drop some dead wood
Signed-off-by: Bruno Wolff III <bruno@wolff.to>
This commit is contained in:
parent
b041e38a0a
commit
5ad2a6e42b
@ -185,37 +185,29 @@ action "Adding live user" useradd \$USERADDARGS -c "Live System User" liveuser
|
|||||||
passwd -d liveuser > /dev/null
|
passwd -d liveuser > /dev/null
|
||||||
|
|
||||||
# turn off firstboot for livecd boots
|
# turn off firstboot for livecd boots
|
||||||
chkconfig --level 345 firstboot off 2>/dev/null
|
systemctl --no-reload disable firstboot-text.service 2> /dev/null || :
|
||||||
# We made firstboot a native systemd service, so it can no longer be turned
|
systemctl --no-reload disable firstboot-graphical.service 2> /dev/null || :
|
||||||
# off with chkconfig. It should be possible to turn it off with systemctl, but
|
systemctl stop firstboot-text.service 2> /dev/null || :
|
||||||
# that doesn't work right either. For now, this is good enough: the firstboot
|
systemctl stop firstboot-graphical.service 2> /dev/null || :
|
||||||
# service will start up, but this tells it not to run firstboot. I suspect the
|
|
||||||
# other services 'disabled' below are not actually getting disabled properly,
|
|
||||||
# with systemd, but we can look into that later. - AdamW 2010/08 F14Alpha
|
|
||||||
echo "RUN_FIRSTBOOT=NO" > /etc/sysconfig/firstboot
|
|
||||||
|
|
||||||
# don't use prelink on a running live image
|
# don't use prelink on a running live image
|
||||||
sed -i 's/PRELINKING=yes/PRELINKING=no/' /etc/sysconfig/prelink &>/dev/null || :
|
sed -i 's/PRELINKING=yes/PRELINKING=no/' /etc/sysconfig/prelink &>/dev/null || :
|
||||||
|
|
||||||
# don't start yum-updatesd for livecd boots
|
|
||||||
chkconfig --level 345 yum-updatesd off 2>/dev/null || :
|
|
||||||
|
|
||||||
# turn off mdmonitor by default
|
# turn off mdmonitor by default
|
||||||
chkconfig --level 345 mdmonitor off 2>/dev/null || :
|
systemctl --no-reload disable mdmonitor.service 2> /dev/null || :
|
||||||
|
systemctl --no-reload disable mdmonitor-takeover.service 2> /dev/null || :
|
||||||
# turn off setroubleshoot on the live image to preserve resources
|
systemctl stop mdmonitor.service 2> /dev/null || :
|
||||||
chkconfig --level 345 setroubleshoot off 2>/dev/null || :
|
systemctl stop mdmonitor-takeover.service 2> /dev/null || :
|
||||||
|
|
||||||
# don't enable the gnome-settings-daemon packagekit plugin
|
# don't enable the gnome-settings-daemon packagekit plugin
|
||||||
gsettings set org.gnome.settings-daemon.plugins.updates active 'false' || :
|
gsettings set org.gnome.settings-daemon.plugins.updates active 'false' || :
|
||||||
|
|
||||||
# don't start cron/at as they tend to spawn things which are
|
# don't start cron/at as they tend to spawn things which are
|
||||||
# disk intensive that are painful on a live image
|
# disk intensive that are painful on a live image
|
||||||
chkconfig --level 345 crond off 2>/dev/null || :
|
systemctl --no-reload disable crond.service 2> /dev/null || :
|
||||||
chkconfig --level 345 atd off 2>/dev/null || :
|
systemctl --no-reload disable atd.service 2> /dev/null || :
|
||||||
|
systemctl stop crond.service 2> /dev/null || :
|
||||||
# Stopgap fix for RH #217966; should be fixed in HAL instead
|
systemctl stop atd.service 2> /dev/null || :
|
||||||
touch /media/.hal-mtab
|
|
||||||
|
|
||||||
# and hack so that we eject the cd on shutdown if we're using a CD...
|
# and hack so that we eject the cd on shutdown if we're using a CD...
|
||||||
if strstr "\`cat /proc/cmdline\`" CDLABEL= ; then
|
if strstr "\`cat /proc/cmdline\`" CDLABEL= ; then
|
||||||
|
@ -155,6 +155,9 @@ exists() {
|
|||||||
|
|
||||||
touch /.liveimg-configured
|
touch /.liveimg-configured
|
||||||
|
|
||||||
|
# Make sure we don't mangle the hardware clock on shutdown
|
||||||
|
ln -sf /dev/null /etc/systemd/system/hwclock-save.service
|
||||||
|
|
||||||
# mount live image
|
# mount live image
|
||||||
if [ -b \`readlink -f /dev/live\` ]; then
|
if [ -b \`readlink -f /dev/live\` ]; then
|
||||||
mkdir -p /mnt/live
|
mkdir -p /mnt/live
|
||||||
@ -253,22 +256,19 @@ action "Adding live user" useradd \$USERADDARGS -c "Live System User" liveuser
|
|||||||
passwd -d liveuser > /dev/null
|
passwd -d liveuser > /dev/null
|
||||||
|
|
||||||
# turn off firstboot for livecd boots
|
# turn off firstboot for livecd boots
|
||||||
chkconfig --level 345 firstboot off 2>/dev/null
|
systemctl --no-reload disable firstboot-text.service 2> /dev/null || :
|
||||||
|
systemctl --no-reload disable firstboot-graphical.service 2> /dev/null || :
|
||||||
# The above doesn't works so we need to do this... GRR systemctl
|
systemctl stop firstboot-text.service 2> /dev/null || :
|
||||||
echo "RUN_FIRSTBOOT=NO" > /etc/sysconfig/firstboot
|
systemctl stop firstboot-graphical.service 2> /dev/null || :
|
||||||
|
|
||||||
# don't use prelink on a running live image
|
# don't use prelink on a running live image
|
||||||
sed -i 's/PRELINKING=yes/PRELINKING=no/' /etc/sysconfig/prelink &>/dev/null || :
|
sed -i 's/PRELINKING=yes/PRELINKING=no/' /etc/sysconfig/prelink &>/dev/null || :
|
||||||
|
|
||||||
# don't start yum-updatesd for livecd boots
|
|
||||||
chkconfig --level 345 yum-updatesd off 2>/dev/null
|
|
||||||
|
|
||||||
# turn off mdmonitor by default
|
# turn off mdmonitor by default
|
||||||
chkconfig --level 345 mdmonitor off 2>/dev/null
|
systemctl --no-reload disable mdmonitor.service 2> /dev/null || :
|
||||||
|
systemctl --no-reload disable mdmonitor-takeover.service 2> /dev/null || :
|
||||||
# turn off setroubleshoot on the live image to preserve resources
|
systemctl stop mdmonitor.service 2> /dev/null || :
|
||||||
chkconfig --level 345 setroubleshoot off 2>/dev/null
|
systemctl stop mdmonitor-takeover.service 2> /dev/null || :
|
||||||
|
|
||||||
# don't do packagekit checking by default
|
# don't do packagekit checking by default
|
||||||
gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t string /apps/gnome-packagekit/frequency_get_updates never >/dev/null
|
gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t string /apps/gnome-packagekit/frequency_get_updates never >/dev/null
|
||||||
@ -285,14 +285,10 @@ gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults
|
|||||||
|
|
||||||
# don't start cron/at as they tend to spawn things which are
|
# don't start cron/at as they tend to spawn things which are
|
||||||
# disk intensive that are painful on a live image
|
# disk intensive that are painful on a live image
|
||||||
chkconfig --level 345 crond off 2>/dev/null
|
systemctl --no-reload disable crond.service 2> /dev/null || :
|
||||||
chkconfig --level 345 atd off 2>/dev/null
|
systemctl --no-reload disable atd.service 2> /dev/null || :
|
||||||
|
systemctl stop crond.service 2> /dev/null || :
|
||||||
# Stopgap fix for RH #217966; should be fixed in HAL instead
|
systemctl stop atd.service 2> /dev/null || :
|
||||||
touch /media/.hal-mtab
|
|
||||||
|
|
||||||
# workaround clock syncing on shutdown that we don't want (#297421)
|
|
||||||
sed -i -e 's/hwclock/no-such-hwclock/g' /etc/rc.d/init.d/halt
|
|
||||||
|
|
||||||
# and hack so that we eject the cd on shutdown if we're using a CD...
|
# and hack so that we eject the cd on shutdown if we're using a CD...
|
||||||
if strstr "\`cat /proc/cmdline\`" CDLABEL= ; then
|
if strstr "\`cat /proc/cmdline\`" CDLABEL= ; then
|
||||||
|
Loading…
Reference in New Issue
Block a user