Add systemd and agetty to the installation environment.
Also, set up anaconda.target to be the default systemd unit.
This commit is contained in:
parent
51addbb7b4
commit
b58190d660
@ -139,6 +139,7 @@ install "smartmontools"
|
|||||||
install "smc-meera-fonts"
|
install "smc-meera-fonts"
|
||||||
install "specspo"
|
install "specspo"
|
||||||
install "strace"
|
install "strace"
|
||||||
|
install "systemd"
|
||||||
install "systemd-sysvinit"
|
install "systemd-sysvinit"
|
||||||
install "tigervnc-server-minimal"
|
install "tigervnc-server-minimal"
|
||||||
install "tigervnc-server-module"
|
install "tigervnc-server-module"
|
||||||
@ -184,6 +185,7 @@ install "${product}-release"
|
|||||||
% endif
|
% endif
|
||||||
|
|
||||||
## required directories
|
## required directories
|
||||||
|
mkdir "/etc/sysconfig"
|
||||||
mkdir "/var/run/dbus"
|
mkdir "/var/run/dbus"
|
||||||
|
|
||||||
## not required packages installed as dependencies
|
## not required packages installed as dependencies
|
||||||
@ -195,7 +197,6 @@ remove "avahi-autoipd"
|
|||||||
remove "avahi-libs"
|
remove "avahi-libs"
|
||||||
remove "basesystem"
|
remove "basesystem"
|
||||||
remove "checkpolicy"
|
remove "checkpolicy"
|
||||||
remove "chkconfig"
|
|
||||||
remove "clusterlib"
|
remove "clusterlib"
|
||||||
remove "clutter"
|
remove "clutter"
|
||||||
remove "clutter-gesture"
|
remove "clutter-gesture"
|
||||||
@ -226,7 +227,6 @@ remove "fedora-release-rawhide"
|
|||||||
remove "fence-agents"
|
remove "fence-agents"
|
||||||
remove "fence-virt"
|
remove "fence-virt"
|
||||||
remove "file"
|
remove "file"
|
||||||
remove "filesystem"
|
|
||||||
remove "fipscheck"
|
remove "fipscheck"
|
||||||
remove "flac"
|
remove "flac"
|
||||||
remove "fontpackages-filesystem"
|
remove "fontpackages-filesystem"
|
||||||
@ -345,7 +345,6 @@ remove "sound-theme-freedesktop"
|
|||||||
remove "squashfs-tools"
|
remove "squashfs-tools"
|
||||||
remove "system-config-firewall-base"
|
remove "system-config-firewall-base"
|
||||||
remove "system-config-users"
|
remove "system-config-users"
|
||||||
remove "systemd-units"
|
|
||||||
remove "telnet"
|
remove "telnet"
|
||||||
remove "tigervnc-license"
|
remove "tigervnc-license"
|
||||||
remove "ttmkfdir"
|
remove "ttmkfdir"
|
||||||
@ -486,7 +485,6 @@ remove --path "/usr/share/mime/video"
|
|||||||
remove --path "/usr/share/mime/x-content"
|
remove --path "/usr/share/mime/x-content"
|
||||||
remove --path "/usr/share/mime/x-epoc"
|
remove --path "/usr/share/mime/x-epoc"
|
||||||
remove --path "/boot"
|
remove --path "/boot"
|
||||||
remove --path "/cgroup"
|
|
||||||
remove --path "/home"
|
remove --path "/home"
|
||||||
remove --path "/media"
|
remove --path "/media"
|
||||||
remove --path "/mnt"
|
remove --path "/mnt"
|
||||||
@ -496,13 +494,11 @@ remove --path "/usr/etc"
|
|||||||
remove --path "/usr/games"
|
remove --path "/usr/games"
|
||||||
remove --path "/usr/local"
|
remove --path "/usr/local"
|
||||||
remove --path "/usr/tmp"
|
remove --path "/usr/tmp"
|
||||||
remove --path "/var/cache"
|
|
||||||
remove --path "/var/db"
|
remove --path "/var/db"
|
||||||
remove --path "/var/games"
|
remove --path "/var/games"
|
||||||
remove --path "/var/lib/rpm/*"
|
remove --path "/var/lib/rpm/*"
|
||||||
remove --path "/var/lib/yum"
|
remove --path "/var/lib/yum"
|
||||||
remove --path "/var/local"
|
remove --path "/var/local"
|
||||||
remove --path "/var/log"
|
|
||||||
remove --path "/var/mail"
|
remove --path "/var/mail"
|
||||||
remove --path "/var/nis"
|
remove --path "/var/nis"
|
||||||
remove --path "/var/opt"
|
remove --path "/var/opt"
|
||||||
@ -536,7 +532,6 @@ remove "ModemManager" "/usr/${libdir}/*"
|
|||||||
remove "ModemManager" "/usr/sbin/*"
|
remove "ModemManager" "/usr/sbin/*"
|
||||||
remove "ModemManager" "/usr/share/icons/*"
|
remove "ModemManager" "/usr/share/icons/*"
|
||||||
remove "NetworkManager" "/etc/rc.d/*"
|
remove "NetworkManager" "/etc/rc.d/*"
|
||||||
remove "NetworkManager" "/lib/systemd/*"
|
|
||||||
remove "NetworkManager" "/usr/bin/*"
|
remove "NetworkManager" "/usr/bin/*"
|
||||||
remove "NetworkManager" "/usr/share/NetworkManager/*"
|
remove "NetworkManager" "/usr/share/NetworkManager/*"
|
||||||
remove "NetworkManager" "/usr/share/locale/*/NetworkManager.mo"
|
remove "NetworkManager" "/usr/share/locale/*/NetworkManager.mo"
|
||||||
@ -564,6 +559,7 @@ remove "audit-libs" "/etc/*"
|
|||||||
remove "audit-libs" "/${libdir}/libauparse*"
|
remove "audit-libs" "/${libdir}/libauparse*"
|
||||||
remove "authconfig" "/usr/sbin/*"
|
remove "authconfig" "/usr/sbin/*"
|
||||||
remove "authconfig" "/usr/share/*"
|
remove "authconfig" "/usr/share/*"
|
||||||
|
remove "avahi" "/lib/systemd/*"
|
||||||
remove "avahi" "/usr/share/locale/*"
|
remove "avahi" "/usr/share/locale/*"
|
||||||
remove "bash" "/etc/*"
|
remove "bash" "/etc/*"
|
||||||
remove "bash" "/usr/bin/*"
|
remove "bash" "/usr/bin/*"
|
||||||
@ -581,6 +577,10 @@ remove "ca-certificates" "/etc/pki/java/*"
|
|||||||
remove "ca-certificates" "/etc/pki/tls/certs/ca-bundle.trust.crt"
|
remove "ca-certificates" "/etc/pki/tls/certs/ca-bundle.trust.crt"
|
||||||
remove "ca-certificates" "/etc/ssl/*"
|
remove "ca-certificates" "/etc/ssl/*"
|
||||||
remove "cairo" "/usr/${libdir}/libcairo-script*"
|
remove "cairo" "/usr/${libdir}/libcairo-script*"
|
||||||
|
remove "chkconfig" "/sbin/chkconfig"
|
||||||
|
remove "chkconfig" "/usr/sbin/alternatives"
|
||||||
|
remove "chkconfig" "/usr/sbin/update-alternatives"
|
||||||
|
remove "chkconfig" "/var/lib/alternatives"
|
||||||
remove "cjkuni-uming-fonts" "/etc/X11/*"
|
remove "cjkuni-uming-fonts" "/etc/X11/*"
|
||||||
remove "coreutils" "/etc/*"
|
remove "coreutils" "/etc/*"
|
||||||
remove "coreutils" "/bin/link"
|
remove "coreutils" "/bin/link"
|
||||||
@ -652,7 +652,6 @@ remove "createrepo" "/usr/share/*"
|
|||||||
remove "cryptsetup-luks" "/usr/share/*"
|
remove "cryptsetup-luks" "/usr/share/*"
|
||||||
remove "cyrus-sasl-lib" "/usr/sbin/*"
|
remove "cyrus-sasl-lib" "/usr/sbin/*"
|
||||||
remove "db4" "/usr/*"
|
remove "db4" "/usr/*"
|
||||||
remove "dbus" "/lib/systemd/*"
|
|
||||||
remove "dbus-glib" "/usr/bin/*"
|
remove "dbus-glib" "/usr/bin/*"
|
||||||
remove "dbus-x11" "/etc/X11/*"
|
remove "dbus-x11" "/etc/X11/*"
|
||||||
remove "dejavu-sans-fonts" "/usr/share/fonts/dejavu/DejaVuSans-BoldOblique*"
|
remove "dejavu-sans-fonts" "/usr/share/fonts/dejavu/DejaVuSans-BoldOblique*"
|
||||||
@ -694,6 +693,7 @@ remove "fedora-gnome-theme" "/usr/share/themes/*"
|
|||||||
remove "file-libs" "/usr/share/*"
|
remove "file-libs" "/usr/share/*"
|
||||||
remove "findutils" "/usr/bin/oldfind"
|
remove "findutils" "/usr/bin/oldfind"
|
||||||
remove "findutils" "/usr/share/*"
|
remove "findutils" "/usr/share/*"
|
||||||
|
remove "firstboot" "/lib/systemd/*"
|
||||||
remove "firstboot" "/usr/sbin/*"
|
remove "firstboot" "/usr/sbin/*"
|
||||||
remove "firstboot" "/usr/share/firstboot/*"
|
remove "firstboot" "/usr/share/firstboot/*"
|
||||||
remove "firstboot" "/usr/share/locale/*"
|
remove "firstboot" "/usr/share/locale/*"
|
||||||
@ -863,7 +863,9 @@ remove "hwdata" "/usr/share/hwdata/oui.txt"
|
|||||||
remove "hwdata" "/usr/share/hwdata/pnp.ids"
|
remove "hwdata" "/usr/share/hwdata/pnp.ids"
|
||||||
remove "hwdata" "/usr/share/hwdata/upgradelist"
|
remove "hwdata" "/usr/share/hwdata/upgradelist"
|
||||||
remove "initscripts" "/etc/ppp/*"
|
remove "initscripts" "/etc/ppp/*"
|
||||||
remove "initscripts" "/lib/systemd/*"
|
remove "initscripts" "/lib/systemd/system/fedora-readonly.service"
|
||||||
|
remove "initscripts" "/lib/systemd/system/fedora-storage-init.service"
|
||||||
|
remove "initscripts" "/lib/systemd/system/fedora-wait-storage.service"
|
||||||
remove "initscripts" "/usr/sbin/*"
|
remove "initscripts" "/usr/sbin/*"
|
||||||
remove "initscripts" "/usr/share/locale/*"
|
remove "initscripts" "/usr/share/locale/*"
|
||||||
remove "iproute" "/etc/*"
|
remove "iproute" "/etc/*"
|
||||||
@ -1109,9 +1111,17 @@ remove "system-config-date" "/usr/share/icons/*"
|
|||||||
remove "system-config-keyboard" "/etc/*"
|
remove "system-config-keyboard" "/etc/*"
|
||||||
remove "system-config-keyboard" "/usr/bin/*"
|
remove "system-config-keyboard" "/usr/bin/*"
|
||||||
remove "system-config-keyboard" "/usr/share/icons/*"
|
remove "system-config-keyboard" "/usr/share/icons/*"
|
||||||
remove "systemd" "/bin/*"
|
remove "systemd-units" "/lib/systemd/system/bluetooth.target"
|
||||||
remove "systemd" "/lib/systemd/*"
|
remove "systemd-units" "/lib/systemd/system/http-daemon.target"
|
||||||
remove "systemd" "/usr/share/systemd/*"
|
remove "systemd-units" "/lib/systemd/system/kexec*"
|
||||||
|
remove "systemd-units" "/lib/systemd/system/local-fs.target.wants/media.mount"
|
||||||
|
remove "systemd-units" "/lib/systemd/system/mail-transfer-agent.target"
|
||||||
|
remove "systemd-units" "/lib/systemd/system/media.mount"
|
||||||
|
remove "systemd-units" "/lib/systemd/system/printer*"
|
||||||
|
remove "systemd-units" "/lib/systemd/system/*plymouth*"
|
||||||
|
remove "systemd-units" "/lib/systemd/system/quota*"
|
||||||
|
remove "systemd-units" "/lib/systemd/system/smartcard*"
|
||||||
|
remove "systemd-units" "/lib/systemd/system/systemd-remount-api-vfs.service"
|
||||||
remove "sysvinit-tools" "/bin/*"
|
remove "sysvinit-tools" "/bin/*"
|
||||||
remove "sysvinit-tools" "/usr/bin/*"
|
remove "sysvinit-tools" "/usr/bin/*"
|
||||||
remove "tar" "/usr/share/locale/*"
|
remove "tar" "/usr/share/locale/*"
|
||||||
@ -1122,7 +1132,6 @@ remove "util-linux" "/bin/taskset"
|
|||||||
remove "util-linux" "/etc/pam.d/chfn"
|
remove "util-linux" "/etc/pam.d/chfn"
|
||||||
remove "util-linux" "/etc/pam.d/chsh"
|
remove "util-linux" "/etc/pam.d/chsh"
|
||||||
remove "util-linux" "/sbin/addpart"
|
remove "util-linux" "/sbin/addpart"
|
||||||
remove "util-linux" "/sbin/agetty"
|
|
||||||
remove "util-linux" "/sbin/cfdisk"
|
remove "util-linux" "/sbin/cfdisk"
|
||||||
remove "util-linux" "/sbin/ctrlaltdel"
|
remove "util-linux" "/sbin/ctrlaltdel"
|
||||||
remove "util-linux" "/sbin/delpart"
|
remove "util-linux" "/sbin/delpart"
|
||||||
|
@ -336,43 +336,25 @@ class LoraxInstallTree(BaseLoraxClass):
|
|||||||
|
|
||||||
def misc_tree_modifications(self):
|
def misc_tree_modifications(self):
|
||||||
if self.basearch in ("s390", "s390x"):
|
if self.basearch in ("s390", "s390x"):
|
||||||
# copy shutdown
|
|
||||||
src = joinpaths(self.root, "usr", self.libdir, "anaconda/shutdown")
|
|
||||||
dst = joinpaths(self.root, "sbin", "shutdown")
|
|
||||||
os.unlink(dst)
|
|
||||||
shutil.copy2(src, dst)
|
|
||||||
|
|
||||||
# copy linuxrc.s390
|
# copy linuxrc.s390
|
||||||
src = joinpaths(self.root, "usr/share/anaconda/linuxrc.s390")
|
src = joinpaths(self.root, "usr/share/anaconda/linuxrc.s390")
|
||||||
dst = joinpaths(self.root, "sbin", "init")
|
dst = joinpaths(self.root, "sbin", "init")
|
||||||
os.unlink(dst)
|
os.unlink(dst)
|
||||||
shutil.copy2(src, dst)
|
shutil.copy2(src, dst)
|
||||||
else:
|
|
||||||
# replace init with anaconda init
|
|
||||||
src = joinpaths(self.root, "usr", self.libdir, "anaconda", "init")
|
|
||||||
dst = joinpaths(self.root, "sbin", "init")
|
|
||||||
os.unlink(dst)
|
|
||||||
shutil.copy2(src, dst)
|
|
||||||
|
|
||||||
# init symlinks
|
# init symlinks
|
||||||
target = "/sbin/init"
|
target = "/sbin/init"
|
||||||
name = joinpaths(self.root, "init")
|
name = joinpaths(self.root, "init")
|
||||||
os.symlink(target, name)
|
os.symlink(target, name)
|
||||||
|
|
||||||
for fname in ["halt", "poweroff", "reboot"]:
|
|
||||||
name = joinpaths(self.root, "sbin", fname)
|
|
||||||
os.unlink(name)
|
|
||||||
os.symlink("init", name)
|
|
||||||
|
|
||||||
for fname in ["runlevel", "shutdown", "telinit"]:
|
|
||||||
name = joinpaths(self.root, "sbin", fname)
|
|
||||||
os.unlink(name)
|
|
||||||
|
|
||||||
# mtab symlink
|
# mtab symlink
|
||||||
#target = "/proc/mounts"
|
#target = "/proc/mounts"
|
||||||
#name = joinpaths(self.root, "etc", "mtab")
|
#name = joinpaths(self.root, "etc", "mtab")
|
||||||
#os.symlink(target, name)
|
#os.symlink(target, name)
|
||||||
|
|
||||||
|
os.unlink(joinpaths(self.root, "etc/systemd/system/default.target"))
|
||||||
|
os.symlink("/lib/systemd/system/anaconda.target", joinpaths(self.root, "etc/systemd/system/default.target"))
|
||||||
|
|
||||||
# create resolv.conf
|
# create resolv.conf
|
||||||
touch(joinpaths(self.root, "etc", "resolv.conf"))
|
touch(joinpaths(self.root, "etc", "resolv.conf"))
|
||||||
|
|
||||||
@ -436,6 +418,11 @@ class LoraxInstallTree(BaseLoraxClass):
|
|||||||
dst = joinpaths(self.root, "etc/selinux", "config")
|
dst = joinpaths(self.root, "etc/selinux", "config")
|
||||||
shutil.copy2(src, dst)
|
shutil.copy2(src, dst)
|
||||||
|
|
||||||
|
# get sysconfig files
|
||||||
|
src = joinpaths(src_dir, "network")
|
||||||
|
dst = joinpaths(self.root, "etc/sysconfig")
|
||||||
|
shutil.copy2(src, dst)
|
||||||
|
|
||||||
def setup_sshd(self, src_dir):
|
def setup_sshd(self, src_dir):
|
||||||
# get sshd config
|
# get sshd config
|
||||||
src = joinpaths(src_dir, "sshd_config.anaconda")
|
src = joinpaths(src_dir, "sshd_config.anaconda")
|
||||||
|
Loading…
Reference in New Issue
Block a user