blob: 262b37d0fbedbc5c5864aead3e2773977462a0e1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
#!/bin/sh
#
# Extract key information from the current to try to generate a test
# suite script to demonstrate detected bugs.
echo 'set +C'
echo "cat <<'EOF' > \$insconf"
grep -v '#' /etc/insserv.conf |grep -v '^$'
echo "EOF"
echo 'set -C'
echo
for f in /etc/init.d/*; do
name=$(basename $f)
case $name in
README|rc|rcS|skeleton)
;;
*)
echo "addscript $name <<'EOF'"
sed -n -r '/^### BEGIN INIT INFO/, /END INIT INFO/p' < $f
echo "EOF"
echo
;;
esac
done
echo 'cd $tmpdir/etc'
echo 'mkdir rc0.d rc1.d rc2.d rc3.d rc4.d rc5.d rc6.d rcS.d'
cd /etc
for f in rc?.d/*; do
case $f in
*/README)
;;
*)
echo ln -s $(readlink $f) $f
;;
esac
done
echo
echo list_rclinks
|