Commit 553762ca authored by Natanael Copa's avatar Natanael Copa

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
parent 663a5e60
...@@ -414,13 +414,20 @@ fetch() { ...@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment