diff options
-rw-r--r-- | abuild.in | 17 |
1 files changed, 12 insertions, 5 deletions
@@ -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 |