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 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
|
#! /bin/sh
if [ "$1" = "configure" ]; then
if [ -d /usr/doc -a ! -e /usr/doc/maintainer-scripts -a -d /usr/share/doc/maintainer-scripts ]; then
ln -sf ../share/doc/maintainer-scripts /usr/doc/maintainer-scripts
fi
fi
# valid
. /usr/share/lintian/shell || exit 0
. /usr/share/lintian/shell >/dev/null
. /usr/share/lintian/shell 2>/dev/null
. /usr/share/lintian/shell </dev/null
# invalid
. /usr/share/lintian/shell foo
print "Hit enter to continue"
read
H[0]='this is a string'
echo ${H[0]}
echo "Index 0's length is ${#H[0]}"
echo "All of the array is: ${H[@]}"
install-info /usr/share/info/foo \
--quiet \ # make it so
--section foo
echo Please use update-rc.d or invoke-rc.d to set up blah blah.
wm-menu-config
chown root.root /usr/share/doc/maintainer-scripts/changelog
chown root:root /usr/share/doc/maintainer-scripts/changelog
$FOO=bar
update-rc.d foo defaults >/dev/null
update-rc.d $FOO defaults
update-rc.d foo remove
# valid
FOO=/tmp
FOO=/var/tmp
: ${FOO:=/tmp}
FOO=`mktemp /tmp/scripts.XXXXXX`
rm "$FOO"
FOO=`tempfile -n/tmp/scripts.tmp`
mkdir /var/tmp/scripts
# invalid
echo foo >>/tmp/scripts.tmp
rm /tmp/scripts.tmp
rmdir /var/tmp/scripts
# invalid, maintainer-script-hides-init-failure
invoke-rc.d foo start || exit 0
# The right way to invoke an rc script
if which invoke-rc.d >/dev/null 2>&1; then
invoke-rc.d package start
else
/etc/init.d/package start
fi
# Example ucf invocation.
ucf /usr/share/foo/configuration /etc/foo.conf
# Calling gconftool directly.
gconftool-2 --makefile-install-rule foo.schema
# Calling gconf-schemas with no dependency.
gconf-schemas --register foo.schema
|