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

View File

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