summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--abuild.in17
1 files changed, 12 insertions, 5 deletions
diff --git a/abuild.in b/abuild.in
index acfef00..300b4d8 100644
--- a/abuild.in
+++ b/abuild.in
@@ -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