scope of variable in prerm script
OK, probably a newb question:
In Ondrej's php5-fpm.prerm script he has:
[ -z "$DPKG_MAINTSCRIPT_NAME" ] && DPKG_MAINTSCRIPT_NAME=php5-fpm
dpkg-maintscript-helper mv_conffile /etc/php5/fpm/main.conf
/etc/php5/fpm/php-fpm.conf 5.3.5-1 -- "$@"
but for mine I have to do:
export DPKG_MAINTSCRIPT_NAME=php5-fpm
dpkg-maintscript-helper mv_conffile /etc/php5/fpm/main.conf
/etc/php5/fpm/php-fpm.conf 5.3.5-1 -- "$@"
Both using #!/bin/sh. How come the variable is available to the child
script in his prerm script but not mine? Thanks.
Reply to: