F15 fix: remove /sbin/init before copying over it

If it's a symlink, we'll copy the file into the symlink, and then we'll
likely remove the target of the symlink (../bin/systemd) in cleanup, and
then we have no init. Boo.
This commit is contained in:
Will Woods 2011-07-06 19:10:48 -04:00
parent f5164d6460
commit 14cc34e1ee

View File

@ -31,19 +31,20 @@ move etc/yum.repos.d etc/anaconda.repos.d
## misc_tree_modifications()
%if int(product.version) > 15:
## Configure systemd to start anaconda
symlink /sbin/init init
remove etc/systemd/system/default.target
symlink /lib/systemd/system/anaconda.target etc/systemd/system/default.target
append bin/login "#!/bin/bash"
append bin/login "exec -l /bin/bash"
%else:
## Set up loader as init
remove sbin/init
copy usr/${libdir}/anaconda/init sbin/init
symlink init sbin/halt
symlink init sbin/poweroff
symlink init sbin/reboot
remove sbin/runlevel sbin/shutdown sbin/telinit
%endif
symlink /sbin/init init
install ${configdir}/network etc/sysconfig
append etc/resolv.conf ""