Re: policy violation and bug reports.
Hi,
>>"Dirk" == Dirk Eddelbuettel <edd@debian.org> writes:
Manoj> conf file in bin directories!! tob.conffiles:/sbin/tob
Dirk> Lintian brought this up as well. I think it warrants an
Dirk> exception as tob is a bash script, and people might have to edit
Dirk> some settings in the file. Were it not a conffile, they'd loose
Dirk> those customisation during the next upgrade.
Heck, no. cvs-* scripts are shell scripts, and they load
customization from /etc/cvsdeb.conf. Just because they are shell
scripts does not mean they can't have config files, as policy
dictates, in /etc. Have tob load a /etc/tob.conf, and put cofig
information in there.
Here is an example how to set a variable depending on the
config file, env variable, or command line; while providing a default
value.
As I said, poor programming practice is not an excuse for not
following Policy.
manoj
______________________________________________________________________
# Command line
while [ $# != 0 ]; do
value="`echo x\"$1\" | sed -e 's/^x-.//'`"
case "$1" in
-R*) opt_rootdir="$value" ;;
) OTHER STUFF GOES HERE ;;
esac
shift
done
# Load site defaults and over rides. ($conf_ variables are set in there)
if [ -f /etc/cvsdeb.conf ]; then
. /etc/cvsdeb.conf
fi
# Command line, env variable, config file, or default
if [ "X$opt_rootdir" != "X" ]; then
rootdir="$opt_rootdir"
elif [ "X$CVSDEB_ROOTDIR" != "X" ]; then
rootdir="$CVSDEB_ROOTDIR"
elif [ "X$conf_rootdir" != "X" ]; then
rootdir="$conf_rootdir"
else
rootdir="DEFAULT VALUE"
fi
______________________________________________________________________
--
When men grow virtuous in their old age, they are merely making a
sacrifice to God of the Devil's leavings. -- Jonathon Swift
Manoj Srivastava <srivasta@acm.org> <http://www.datasync.com/%7Esrivasta/>
Key C7261095 fingerprint = CB D9 F4 12 68 07 E4 05 CC 2D 27 12 1D F5 E8 6E
--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-devel-request@lists.debian.org .
Trouble? e-mail to templin@bucknell.edu .
Reply to: