27ab9ee58f
- 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. (forwarded request 81717 from fcrozat) OBS-URL: https://build.opensuse.org/request/show/81718 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/systemd?expand=0&rev=65
35 lines
1010 B
Bash
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
|
|
|