SHA256
1
0
forked from pool/systemd
systemd/systemd-insserv_conf
Frederic Crozat 63dfe6a158 Accepting request 81717 from home:fcrozat:systemd
- Add revert_insserv_conf_parsing.patch and systemd-insserv_conf:
  remove insserv.conf parsing from systemd and use generator
  instead.
- put back default.target creation at package install and remove
  inittab generator, Yast2 is now able to create it.

- Add revert_insserv_conf_parsing.patch and systemd-insserv_conf:
  remove insserv.conf parsing from systemd and use generator
  instead.
- put back default.target creation at package install and remove
  inittab generator, Yast2 is now able to create it.

OBS-URL: https://build.opensuse.org/request/show/81717
OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=189
2011-09-09 16:22:08 +00:00

35 lines
1010 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.wants/ ;;
esac
done
;;
esac
done < /etc/insserv.conf