3 if [ "$1" = "configure" ]; then
4 if [ -d /usr/doc -a ! -e /usr/doc/maintainer-scripts -a -d /usr/share/doc/maintainer-scripts ]; then
5 ln -sf ../share/doc/maintainer-scripts /usr/doc/maintainer-scripts
10 . /usr/share/lintian/shell || exit 0
11 . /usr/share/lintian/shell >/dev/null
12 . /usr/share/lintian/shell 2>/dev/null
13 . /usr/share/lintian/shell </dev/null
14 . "$(dirname $0)/shell" ; bar
16 . /usr/share/lintian/shell foo
17 . "$(dirname $0)/shell" bar
19 print "Hit enter to continue"
22 H[0]='this is a string'
24 echo "Index 0's length is ${#H[0]}"
25 echo "All of the array is: ${H[@]}"
27 install-info /usr/share/info/foo \
28 --quiet \ # make it so
31 echo Please use update-rc.d or invoke-rc.d to set up blah blah.
35 chown root.root /usr/share/doc/maintainer-scripts/changelog
36 chown root:root /usr/share/doc/maintainer-scripts/changelog
39 update-rc.d foo defaults >/dev/null
40 update-rc.d $FOO defaults
41 update-rc.d foo remove
47 FOO=`mktemp /tmp/scripts.XXXXXX`
49 FOO=`tempfile -n/tmp/scripts.tmp`
50 mkdir /var/tmp/scripts
52 echo foo >>/tmp/scripts.tmp
54 rmdir /var/tmp/scripts
56 # invalid, maintainer-script-hides-init-failure
57 invoke-rc.d foo start || exit 0
59 # The right way to invoke an rc script
60 if which invoke-rc.d >/dev/null 2>&1; then
61 invoke-rc.d package start
63 /etc/init.d/package start
66 # Example ucf invocation.
67 ucf /usr/share/foo/configuration /etc/foo.conf
69 # Calling gconftool directly.
70 gconftool-2 --makefile-install-rule foo.schema
72 # Calling gconf-schemas with no dependency.
73 gconf-schemas --register foo.schema
75 # Calling update-xmlcatalog with no dependency.
76 update-xmlcatalog --add --type system --id "/usr/share/sgml/dtd/foo" \
77 --package maintainer-scripts --root
79 # Maintainer scripts shouldn't touch /var/lib/dpkg/status. This is the old
80 # recipe from the dpkg wiki that should be replaced with dpkg-query.
81 sed -n -e \"/^Conffiles:/,/^[^ ]/{\\\\' /etc/conffile'{s/.* //;p}}\" \
84 # Don't modify these files.
85 echo 'broken 6714/tcp' >> /etc/services
86 cp /nonexistent /etc/protocols
87 mv /usr/share/doc/rpc /etc/rpc
90 cp /etc/protocols /etc/protocols.new
93 echo 'broken' > /etc/inetd.conf
94 cp /etc/inetd.conf.new /etc/inetd.conf
97 cp /etc/inetd.conf /srv/chroot/etc/inetd.conf
99 # Deprecated and not allowed except the second one.
100 install-sgmlcatalog --install package
101 install-sgmlcatalog --remove package
103 # This too is a heredoc.
104 some-program > /etc/config-file <<'EOF'
105 echo "All of the array is: ${H[@]}"
110 echo "All of the array is: ${H[@]}"
115 echo "All of the arry is ${H[@]}"
120 echo "All of the array is ${H[@]}"
125 echo "All of the array is ${H[@]}"
132 echo "All of the array is ${H[@]}"
137 echo "All of the array is ${H[@]}"
140 # Recognize single quotes even if they start at the beginning of a line.
142 '/{ptex,tex}/{amstex,plain,generic,}'
148 select foo in a b ; do echo $foo ; done
156 if test -a /etc/default ; then
160 # Calling start-stop-daemon directly in an init script.
161 start-stop-daemon --start --quiet --name foo --startas /usr/bin/foo
163 # But stopping it is fine -- we may be working around something else.
164 start-stop-daemon --stop --quiet --name foo --startas /usr/bin/foo
166 # Deprecated chown use with flags.
167 chown -R root.root /usr/share/doc/maintainer-scripts