abuild: implement initdcheck
this check verifies that the *.initd scripts are #!/sbin/runscript
This commit is contained in:
parent
f580e6657a
commit
0472849c0c
16
abuild.in
16
abuild.in
|
@ -254,11 +254,27 @@ fetch() {
|
||||||
default_fetch
|
default_fetch
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# verify that all init.d scripts are openrc runscripts
|
||||||
|
initdcheck() {
|
||||||
|
local i
|
||||||
|
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"
|
||||||
|
return 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
# unpack the sources
|
# unpack the sources
|
||||||
default_unpack() {
|
default_unpack() {
|
||||||
local u
|
local u
|
||||||
if [ -z "$force" ]; then
|
if [ -z "$force" ]; then
|
||||||
md5check || return 1
|
md5check || return 1
|
||||||
|
initdcheck || return 1
|
||||||
fi
|
fi
|
||||||
mkdir -p "$srcdir"
|
mkdir -p "$srcdir"
|
||||||
for u in $source; do
|
for u in $source; do
|
||||||
|
|
Loading…
Reference in New Issue