manipulate network service in %post (#1369794)

Due to #1369794 , anaconda cannot currently manipulate sysv
services in F25+. So to work around this, take 'network' out of
the services lines in all kickstarts and instead manipulate
it in the %post section, with chkconfig.

Also remove rsyslog from the Atomic image services line because
it doesn't appear to be included in the OStree tree at present
and so attempting to enable the service breaks Atomic image
compose, see e.g.:

https://kojipkgs.fedoraproject.org//work/tasks/9022/15349022/oz-x86_64.log

also correct the name of the ssh service in fedora-arm-base.ks;
it's sshd not ssh.
This commit is contained in:
Adam Williamson 2016-08-24 09:50:38 -07:00
parent 9181574bcc
commit 4fc84a77a2
8 changed files with 40 additions and 9 deletions

View File

@ -9,7 +9,6 @@ selinux --permissive
firewall --disabled firewall --disabled
bootloader --timeout=1 --append="acpi=force" bootloader --timeout=1 --append="acpi=force"
network --bootproto=dhcp --device=eth0 --onboot=on network --bootproto=dhcp --device=eth0 --onboot=on
services --enabled=network
# Uncomment the next line # Uncomment the next line
# to make the root password be thincrust # to make the root password be thincrust
@ -95,5 +94,9 @@ generic-logos
# #
%post %post
# Enable network service here, as doing it in the services line
# fails due to RHBZ #1369794
/sbin/chkconfig network on
%end %end

View File

@ -14,7 +14,7 @@ part / --size=3584 --fstype ext4
# make sure that initial-setup runs and lets us do all the configuration bits # make sure that initial-setup runs and lets us do all the configuration bits
firstboot --reconfig firstboot --reconfig
services --enabled=ssh,NetworkManager,avahi-daemon,rsyslog,chronyd,initial-setup --disabled=network services --enabled=sshd,NetworkManager,avahi-daemon,rsyslog,chronyd,initial-setup
%include fedora-repo.ks %include fedora-repo.ks
@ -74,5 +74,9 @@ systemctl mask tmp.mount
dnf -y remove dracut-config-generic dnf -y remove dracut-config-generic
# Disable network service here, as doing it in the services line
# fails due to RHBZ #1369794
/sbin/chkconfig network off
%end %end

View File

@ -21,8 +21,7 @@ firewall --disabled
bootloader --timeout=1 --append="no_timer_check console=tty1 console=ttyS0,115200n8" bootloader --timeout=1 --append="no_timer_check console=tty1 console=ttyS0,115200n8"
network --bootproto=dhcp --device=link --activate --onboot=on network --bootproto=dhcp --device=link --activate --onboot=on
services --disabled=network services --enabled=sshd,cloud-init,cloud-init-local,cloud-config,cloud-final
services --enabled=sshd,rsyslog,cloud-init,cloud-init-local,cloud-config,cloud-final
zerombr zerombr
clearpart --all clearpart --all
@ -125,5 +124,9 @@ echo "(Don't worry -- that out-of-space error was expected.)"
echo "Adding Developer Mode GRUB2 menu item." echo "Adding Developer Mode GRUB2 menu item."
/usr/libexec/atomic-devmode/bootentry add /usr/libexec/atomic-devmode/bootentry add
# Disable network service here, as doing it in the services line
# fails due to RHBZ #1369794
/sbin/chkconfig network off
%end %end

View File

@ -14,7 +14,7 @@ network --bootproto=dhcp --device=link --activate
part / --fstype="ext4" --size=6000 part / --fstype="ext4" --size=6000
part /boot --size=500 --fstype="ext4" part /boot --size=500 --fstype="ext4"
shutdown shutdown
services --disabled=docker-storage-setup,network services --disabled=docker-storage-setup
services --enabled=NetworkManager,sshd,cloud-init,cloud-init-local,cloud-config,cloud-final services --enabled=NetworkManager,sshd,cloud-init,cloud-init-local,cloud-config,cloud-final
ostreesetup --nogpg --osname=fedora-atomic --remote=fedora-atomic --url=http://kojipkgs.fedoraproject.org/mash/atomic/22/ --ref=fedora-atomic/f22/x86_64/docker-host ostreesetup --nogpg --osname=fedora-atomic --remote=fedora-atomic --url=http://kojipkgs.fedoraproject.org/mash/atomic/22/ --ref=fedora-atomic/f22/x86_64/docker-host
@ -28,4 +28,9 @@ userdel -r none
# We copy content of separate /boot partition to root part when building live squashfs image, # We copy content of separate /boot partition to root part when building live squashfs image,
# and we don't want systemd to try to mount it when pxe booting # and we don't want systemd to try to mount it when pxe booting
cat /dev/null > /etc/fstab cat /dev/null > /etc/fstab
# Disable network service here, as doing it in the services line
# fails due to RHBZ #1369794
/sbin/chkconfig network off
%end %end

View File

@ -39,7 +39,7 @@ firewall --disabled
bootloader --timeout=1 --append="no_timer_check console=tty1 console=ttyS0,115200n8" --extlinux bootloader --timeout=1 --append="no_timer_check console=tty1 console=ttyS0,115200n8" --extlinux
network --bootproto=dhcp --device=link --activate --onboot=on network --bootproto=dhcp --device=link --activate --onboot=on
services --enabled=network,sshd,rsyslog,cloud-init,cloud-init-local,cloud-config,cloud-final services --enabled=sshd,rsyslog,cloud-init,cloud-init-local,cloud-config,cloud-final
zerombr zerombr
clearpart --all clearpart --all
@ -265,5 +265,9 @@ echo "(Don't worry -- that out-of-space error was expected.)"
# For trac ticket https://fedorahosted.org/cloud/ticket/128 # For trac ticket https://fedorahosted.org/cloud/ticket/128
rm -f /etc/sysconfig/network-scripts/ifcfg-ens3 rm -f /etc/sysconfig/network-scripts/ifcfg-ens3
# Enable network service here, as doing it in the services line
# fails due to RHBZ #1369794
/sbin/chkconfig network on
%end %end

View File

@ -26,7 +26,7 @@ firewall --disabled
bootloader --timeout=1 --append="no_timer_check console=tty1 console=ttyS0,115200n8" --extlinux bootloader --timeout=1 --append="no_timer_check console=tty1 console=ttyS0,115200n8" --extlinux
network --bootproto=dhcp --device=eth0 --activate --onboot=on network --bootproto=dhcp --device=eth0 --activate --onboot=on
services --enabled=network,sshd,rsyslog,cloud-init,cloud-init-local,cloud-config,cloud-final services --enabled=sshd,rsyslog,cloud-init,cloud-init-local,cloud-config,cloud-final
zerombr zerombr
clearpart --all clearpart --all
@ -219,5 +219,9 @@ dd bs=1M if=/dev/zero of=/var/tmp/zeros || :
rm -f /var/tmp/zeros rm -f /var/tmp/zeros
echo "(Don't worry -- that out-of-space error was expected.)" echo "(Don't worry -- that out-of-space error was expected.)"
# Enable network service here, as doing it in the services line
# fails due to RHBZ #1369794
/sbin/chkconfig network on
%end %end

View File

@ -17,7 +17,7 @@ firewall --disabled
bootloader --timeout=1 --append="no_timer_check console=tty1 console=ttyS0,115200n8" --extlinux bootloader --timeout=1 --append="no_timer_check console=tty1 console=ttyS0,115200n8" --extlinux
network --bootproto=dhcp --device=eth0 --activate --onboot=on network --bootproto=dhcp --device=eth0 --activate --onboot=on
services --enabled=network,sshd,rsyslog,cloud-init,cloud-init-local,cloud-config,cloud-final services --enabled=sshd,rsyslog,cloud-init,cloud-init-local,cloud-config,cloud-final
zerombr zerombr
clearpart --all clearpart --all
@ -211,5 +211,9 @@ dd bs=1M if=/dev/zero of=/var/tmp/zeros || :
rm -f /var/tmp/zeros rm -f /var/tmp/zeros
echo "(Don't worry -- that out-of-space error was expected.)" echo "(Don't worry -- that out-of-space error was expected.)"
# Enable network service here, as doing it in the services line
# fails due to RHBZ #1369794
/sbin/chkconfig network on
%end %end

View File

@ -17,7 +17,7 @@ xconfig --startxonboot
zerombr zerombr
clearpart --all clearpart --all
part / --size 5120 --fstype ext4 part / --size 5120 --fstype ext4
services --enabled=NetworkManager,ModemManager --disabled=network,sshd services --enabled=NetworkManager,ModemManager --disabled=sshd
network --bootproto=dhcp --device=link --activate network --bootproto=dhcp --device=link --activate
shutdown shutdown
@ -321,6 +321,10 @@ echo 'File created by kickstart. See systemd-update-done.service(8).' \
# See bug 1317709 # See bug 1317709
rm -f /boot/*-rescue* rm -f /boot/*-rescue*
# Disable network service here, as doing it in the services line
# fails due to RHBZ #1369794
/sbin/chkconfig network off
%end %end