From 0472849c0c03803418d57db7750dc8d829f9ee55 Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Tue, 4 Jan 2011 09:05:54 +0000 Subject: abuild: implement initdcheck this check verifies that the *.initd scripts are #!/sbin/runscript --- abuild.in | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'abuild.in') diff --git a/abuild.in b/abuild.in index b5d716d..ae2dd84 100755 --- a/abuild.in +++ b/abuild.in @@ -254,11 +254,27 @@ 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 default_unpack() { local u if [ -z "$force" ]; then md5check || return 1 + initdcheck || return 1 fi mkdir -p "$srcdir" for u in $source; do -- cgit v1.2.3