systemd/systemd-insserv_conf
Frederic Crozat 7cf3cf82cb Accepting request 85813 from home:fcrozat:systemd
- Update to version 36 :
  - many bugfixes
  - systemd now requires socket-activated syslog implementations
  - After=syslog.target is no longer needed in .service files
  - X-Interactive is ignored in LSB headers (was not working)
- Enable back insserv.conf parsing in systemd core and fix added
  dependencies (bnc#721428).
- Fix detection of LSB services status when running daemon
  (bnc#721426).
- Drop 0001-execute-fix-bus-serialization-for-commands.patch,
  fix-reload.patch

OBS-URL: https://build.opensuse.org/request/show/85813
OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=204
2011-09-30 15:58:39 +00:00

35 lines
1013 B
Bash

#!/bin/bash
[ -r /etc/insserv.conf ] || exit 0
declare -A facilities
facilities["local_fs"]="local-fs.target"
facilities["localfs"]="local-fs.target"
facilities["named"]="nss-lookup.target"
facilities["network"]="network.target"
# done in systemd code
#facilities["portmap"]="rpcbind.target"
facilities["remote_fs"]="remote-fs.target"
facilities["syslog"]="syslog.target"
facilities["time"]="time-sync.target"
while read line ; do
case "$line" in
\#*|"" ) continue;;
\<* ) continue;;
\$*) t=${line%% *}
target=${facilities[${t:1}]}
[ -z $target ] && continue
mkdir -p $1/$target.{requires,wants}
for dep in ${line##* } ; do
stripped_dep=${dep/boot./}
case "$stripped_dep" in
+*) ln -s -f /lib/systemd/system/${facilities[${stripped_dep:2}]:-${stripped_dep:1}.service} $1/$target.wants/ ;;
*) ln -s -f /lib/systemd/system/${facilities[${stripped_dep:1}]:-${stripped_dep}.service} $1/$target.requires/ ;;
esac
done
;;
esac
done < /etc/insserv.conf