Git init
[external/insserv.git] / debian / make-testsuite
1 #!/bin/sh
2 #
3 # Extract key information from the current to try to generate a test
4 # suite script to demonstrate detected bugs.
5
6 echo "cat <<'EOF' > \$tmpdir\$insconf"
7 grep -v '#' /etc/insserv.conf |grep -v '^$'
8 echo "EOF"
9
10 for f in /etc/init.d/*; do
11         name=$(basename $f)
12         case $name in
13             README|rc|rcS|skeleton)
14                 ;;
15             *)
16                 echo "addscript $name <<EOF"
17                 sed -n -r '/^### BEGIN INIT INFO/, /END INIT INFO/p' < $f
18                 echo "EOF"
19                 echo
20                 ;;
21         esac
22 done
23
24 cd /etc
25 for f in rc?.d/*; do
26         case $f in
27             */README)
28                 ;;
29             *)
30                 echo ln -s $(readlink $f) $f
31                 ;;
32         esac
33 done