From 51472dee28255b97edffa2f0aa5c6835c26e9013 Mon Sep 17 00:00:00 2001 From: Will Woods Date: Thu, 26 May 2011 14:21:13 -0400 Subject: [PATCH] template fixup: use product.version instead of conf.systemd --- share/runtime-cleanup.tmpl | 20 ++++++++++---------- share/runtime-postinstall.tmpl | 13 +++++++------ 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/share/runtime-cleanup.tmpl b/share/runtime-cleanup.tmpl index d8d6de8a..407c828f 100644 --- a/share/runtime-cleanup.tmpl +++ b/share/runtime-cleanup.tmpl @@ -226,8 +226,16 @@ remove /var/yp ## icons cache remove /usr/share/icons/*/icon-theme.cache -## systemd or not? -%if conf.systemd: +## remove systemd for F15, otherwise clean it up +%if int(product.version) == 15: + remove /cgroup /var/cache /var/log + removepkg chkconfig filesystem systemd-units + removefrom NetworkManager /lib/systemd/* + removefrom dbus /lib/systemd/* + removefrom initscripts /lib/systemd/* + removefrom systemd /bin/* /lib/systemd/* /usr/share/systemd/* + removefrom util-linux /sbin/agetty +%else: removefrom ConsoleKit /lib/systemd/* removefrom avahi /lib/systemd/* removefrom chkconfig /sbin/chkconfig @@ -252,14 +260,6 @@ remove /usr/share/icons/*/icon-theme.cache removefrom systemd-units /lib/systemd/system/quota* removefrom systemd-units /lib/systemd/system/smartcard* removefrom systemd-units /lib/systemd/system/systemd-remount-api-vfs.service -%else: - remove /cgroup /var/cache /var/log - removepkg chkconfig filesystem systemd-units - removefrom NetworkManager /lib/systemd/* - removefrom dbus /lib/systemd/* - removefrom initscripts /lib/systemd/* - removefrom systemd /bin/* /lib/systemd/* /usr/share/systemd/* - removefrom util-linux /sbin/agetty %endif ## other package specific removals diff --git a/share/runtime-postinstall.tmpl b/share/runtime-postinstall.tmpl index 4befed7e..e40d9087 100644 --- a/share/runtime-postinstall.tmpl +++ b/share/runtime-postinstall.tmpl @@ -44,18 +44,19 @@ append etc/depmod.d/dd.conf "search updates built-in" ## misc_tree_modifications() -%if conf.systemd: - symlink "/sbin/init" init - remove etc/systemd/system/default.target - symlink "/lib/systemd/system/anaconda.target" etc/systemd/system/default.target - install ${configdir}/network etc/sysconfig -%else: +## set up our own init for F15, otherwise use systemd +%if int(product.version) == 15: copy usr/${libdir}/anaconda/shutdown sbin/shutdown 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 +%else: + symlink "/sbin/init" init + remove etc/systemd/system/default.target + symlink "/lib/systemd/system/anaconda.target" etc/systemd/system/default.target + install ${configdir}/network etc/sysconfig %endif append etc/resolv.conf "" append bin/login "#!/bin/bash"