abuild: require that .initd files are sbin/openrc-run

The sbin/runscript was renamed to sbin/openrc-run with openrc-0.13

warn only if it is sbin/runscript for compatibility
This commit is contained in:
Natanael Copa 2015-04-28 13:20:29 +00:00
parent 663a5e6031
commit 553762ca30
1 changed files with 12 additions and 5 deletions

View File

@ -414,13 +414,20 @@ fetch() {
# verify that all init.d scripts are openrc runscripts
initdcheck() {
local i
local i line
for i in $source; do
case $i in
*.initd)
head -n 1 "$srcdir"/$i | grep -q '/sbin/runscript' \
&& continue
error "$i is not an openrc #!/sbin/runscript"
*.initd) line=$(head -n 1 "$srcdir"/$i);;
*) continue ;;
esac
case "$line" in
*sbin/openrc-run)
;;
*sbin/runscript)
warning "$i is not an openrc #!/sbin/openrc-run"
;;
*) error "$i is not an openrc #!/sbin/openrc-run"
return 1
;;
esac