Bug#299635: please reconsider using a non-hardcoded $NAME

Timo Aaltonen tjaalton at ubuntu.com
Wed Feb 22 11:42:12 UTC 2012


	Hi!

  I'm packaging the Dogtag PKI Certificate Server, and one of the
current blockers is that the tomcat initscript (which the pki instances
symlink to) doesn't allow starting a new tomcat instance. I looked at
what Fedora does, and they have this in their initscript:

NAME="$(basename $0)"
unset ISBOOT
if [ "${NAME:0:1}" = "S" -o "${NAME:0:1}" = "K" ]; then
    NAME="${NAME:3}"
    ISBOOT="1"
fi

(though ISBOOT isn't used after this point, so it probably is just a
leftover).

This would have to be reimplemented in pure shell without bashism
though.. something like this:

NAME="$(basename "$0" | sed 's/^[KS][0-9]\{2\}//')"

thoughts? :)


-- 
t





More information about the pkg-java-maintainers mailing list