This one time, at band camp, Robert Millan said: > Hi Manoj, > > Using absolute paths in /etc/kernel-img.conf *_hook variables can have horrid > consequences when things like this happen: > > - the command (in /usr) turns out to be in FHS violation and must be moved > to /. > - the command (in /) turns out to depend on stuff from /usr, and must be > moved to /usr. > > You can see #361929 for an example. Hardcoded paths for /sbin/update-grub are > now in everyone's system and it'll be a mess to fix this. > > Unfortunately, the "(-x foo)" sanity checks that are performed in > kernel-package > scripts make the assumption that the path is absolute, as the check fails > otherwise. I'm not sure if that's intentional, but it's a very bad thing to > do. > > Please could you apply the attached patch to disable the checks? (or rewrite > the checks in some way that doesn't break relative paths)
Or just use something like: sub which { my $progname = $_ ; for my $dir (split /:/, $ENV{"PATH"}) { if (-x "$dir/$progname" ) { return "$dir/$progname"; } } return 0; } And then use constructs like if (which($postinst_hook)) { ... } I can't remember if you use taint mode and warnings and so forth, but if you do, substitute an array of known good paths for ENV{"PATH"}. In any event, I am not sure this is RC, but I'll let manoj deal with that. Take care, -- ----------------------------------------------------------------- | ,''`. Stephen Gran | | : :' : [EMAIL PROTECTED] | | `. `' Debian user, admin, and developer | | `- http://www.debian.org | -----------------------------------------------------------------
signature.asc
Description: Digital signature