diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2015-04-28 13:20:29 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2015-04-28 14:09:11 +0000 |
commit | 553762ca3095fff20e2cd96593ba2d53b6932a36 (patch) | |
tree | 22530d807a3567372b041fc10883ea8be528473e /abuild.in | |
parent | 663a5e603113005c756ce8f905ba92989af50367 (diff) | |
download | abuild-553762ca3095fff20e2cd96593ba2d53b6932a36.tar.gz abuild-553762ca3095fff20e2cd96593ba2d53b6932a36.tar.bz2 abuild-553762ca3095fff20e2cd96593ba2d53b6932a36.tar.xz abuild-553762ca3095fff20e2cd96593ba2d53b6932a36.zip |
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
Diffstat (limited to 'abuild.in')
-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 |