[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Policy on Account creation and deletion?

On Tue, Mar 16, 2004 at 04:01:09PM +0100, Marc Haber wrote:
> Any ideas how one could implement shared variables in maintainer
> scripts? There are things like the account name that need to be
> present in postinst and postrm, and I am notorious for changing one
> while leaving the other. Is there any recommended hack to do variable
> substitution in maintainer scripts at build time?

The autoconf/debhelper way?

for file in postrm prerm postinst preinst
  sed -ie "s/USERNAME_TO_BE_FILLED_HERE/$username/g" debian/$file

Wouter Verhelst
Debian GNU/Linux -- http://www.debian.org
Nederlandstalige Linux-documentatie -- http://nl.linux.org
"Stop breathing down my neck." "My breathing is merely a simulation."
"So is my neck, stop it anyway!"
  -- Voyager's EMH versus the Prometheus' EMH, stardate 51462.

Attachment: signature.asc
Description: Digital signature

Reply to: