Bug#32263: Splitting CGI-BIN
On Mon, Sep 23, 2002 at 05:34:44PM -0500, Manoj Srivastava wrote:
> Have we decided on whether aj's proposed changes (below) are
> what we reached a consensus on?
> ======================================================================
> /usr/lib/cgi-bin/
> <packages dump CGI scripts in here willy-nilly>
> ~wwwdata/cgi-bin/
> <packages make symlinks to /usr/lib/cgi-bin/blah in postinst,
> based on some setting in /etc/ somewhere>
> So that admins can just rm symlinks to scripts they don't need, or,
> if they want to be absolutely sure they don't get any cgi-bin scripts
> they don't want, change the config file.
> ======================================================================
> Hmm. What happens if I remove a symlink, and then the package
> is upgraded?
I'd assume what we'd want is for the symlink to stay removed. Something like:
if [ "$1" = "configure" ]; then
if [ "$2" = "" ] || dpkg --compare-versions "$2" -lt 1.0.3-5; do
# first install, or first install since support for update-cgi
# added
update-cgi --add /usr/lib/cgi-bin/foo
fi
fi
should handle that, I think.
Probably with:
update-cgi --disable /usr/lib/cgi-bin/foo
(which notes whether or not there was a symlink for foo
somewhere and removes the symlink, for dpkg --remove)
update-cgi --enable /usr/lib/cgi-bin/foo
(which looks at the note, and recreates the symlink if
appropriate)
update-cgi --remove /usr/lib/cgi-bin/foo
(which just removes the symlink)
at appropriate places in the *rm scripts.
Cheers,
aj
--
Anthony Towns <aj@humbug.org.au> <http://azure.humbug.org.au/~aj/>
I don't speak for anyone save myself. GPG signed mail preferred.
``If you don't do it now, you'll be one year older when you do.''
Reply to: