summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Schmelzer2011-11-28 14:38:29 +0100
committerSebastian Schmelzer2011-11-28 14:38:29 +0100
commit48ab8f8aa6bdea343ec949fa4563ec588e0382da (patch)
tree6724f70fc4334c04fafc937642c1b0f1304c1cbb
parentnext test (diff)
downloadcore-48ab8f8aa6bdea343ec949fa4563ec588e0382da.tar.gz
core-48ab8f8aa6bdea343ec949fa4563ec588e0382da.tar.xz
core-48ab8f8aa6bdea343ec949fa4563ec588e0382da.zip
update rllinker for suse 12.1
-rw-r--r--src/initramfs/distro-specs/suse/functions-12.126
1 files changed, 21 insertions, 5 deletions
diff --git a/src/initramfs/distro-specs/suse/functions-12.1 b/src/initramfs/distro-specs/suse/functions-12.1
index a6b5db36..3b05ca2d 100644
--- a/src/initramfs/distro-specs/suse/functions-12.1
+++ b/src/initramfs/distro-specs/suse/functions-12.1
@@ -25,16 +25,17 @@
# distro specific function called from servconfig script
config_distro () {
# clean the runlevel directories which will be populated by the stage3 setup
-#rm -rf /mnt/etc/init.d*
+rm -rf /mnt/etc/init.d*
touch /mnt/var/log/btmp
touch /mnt/var/log/lastlog
SERVICES="systemd-hostnamed.service dbus-org.freedesktop.hostname1.service \
remount-rootfs.service avahi-dnsconfd.service fsck* \
- Network* postfix* multi-user.target.wants/Network* \
- multi-user.target.wants/remote* default.target.wants/YaST2* \
- network.target.wants/Network*";
+ Network* postfix* *.wants/Network* \
+ *.wants/remote* *.wants/YaST2*";
# translate wildcards
-SERVICES=$(cd /mnt/lib/systemd/system/ && ls -1 $SERVICES)
+SERVICES_LIB=$(cd /mnt/lib/systemd/system/ && for f in $SERVICES; do echo $f; done| grep -v '*')
+SERVICES_ETC=$(cd /mnt/etc/systemd/system/ && for f in $SERVICES; do echo $f; done| grep -v '*')
+SERVICES=$(echo -e "$SERVICES_ETC\n$SERVICES_LIB" | sort -u)
for file in $SERVICES;
do
ln -sf /dev/null /mnt/etc/systemd/system/${file}
@@ -48,6 +49,21 @@ sed -e "1i# /etc/sysctl.conf - modified by $0 version $version" \
}
+# linking runlevel scripts
+rllinker () {
+local script="$1"
+# empty runlevel links - decision on running certain services is
+# passed via configuration
+if [ -f /mnt/etc/systemd/system/${script}.service ]; then
+ ln -sf /etc/systemd/system/${script}.service \
+ /mnt/etc/systemd/system/default.target.wants/${script}.service
+else if [ -f /mnt/lib/systemd/system/${script}.service ]; then
+ ln -sf /lib/systemd/system/${script}.service \
+ /mnt/etc/systemd/system/default.target.wants/${script}.service
+fi
+}
+
+
# start portmapper (needed at least for nfs and nis services)
config_portmap () {
# portmap is provided via rpcbind in suse 11.1,2,3,4 and 12.1