On Wed, Jan 04, 2006 at 12:58:29AM +0100, Marc Haber wrote: > Please at least offer the possibility to pass parameters to hook > scripts (so that update-grub could get a --silent option), or - even > better - to use a shell for hook script invocation so that constructs > like > > postinst_hook = /sbin/update-grub > /dev/null 2>&1 > > become possible by forcibly silencing the hook script until the hook > script has been adapted.
In contradiction to what has been said on IRC, this is not possible at the moment. The postinst script takes the first token after the "=" and execs that token. So, when postinst_hook = /sbin/update-grub > /dev/null 2>&1, /sbin/update-grub is called with the output not redirected, when postinst_hook = /bin/sh -c /sbin/update-grub > /dev/null 2>&1, /bin/sh is called with the kernel version number as parameter, which is a silent error, and when postinst_hook = "/bin/sh -c /sbin/update-grub > /dev/null 2>&1, a non-existent "/bin/sh is called, which is also a silent error. Thus, I would like to ask for a little more intelligence, allowing constructs like postinst_hook = /sbin/update-grub > /dev/null 2>&1 or postinst_hook = sh -c "/sbin/update-grub > /dev/null 2>&1" Additionally, the postinst should not silently ignore the configured hook if the program cannot be found, and it should probably warn on if the hook exists with non-zero return code as well. Greetings Marc -- ----------------------------------------------------------------------------- Marc Haber | "I don't trust Computers. They | Mailadresse im Header Mannheim, Germany | lose things." Winona Ryder | Fon: *49 621 72739834 Nordisch by Nature | How to make an American Quilt | Fax: *49 621 72739835 -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]