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

Bug#597581: update-initramfs should not set PATH

Package: initramfs-tools
Version: 0.92o

I've been doing some exciting initramfs hacking and I found that my
hook scripts were not working because although I call update-initramfs
with /usr/local/{sbin,bin} on my path, they were being removed.

$ dpkg -L initramfs-tools | xargs grep PATH
/usr/sbin/mkinitramfs:export PATH='/usr/bin:/sbin:/bin'

I don't think this is correct.  It seems to have been introduced in
response to #409995, which was a complaint that (in effect) /sbin
could be missing from the path.

The correct approach would be to add /usr/sbin and /sbin to the end of
PATH, something like this:
  export PATH="${PATH-/usr/local/bin:/bin:/usr/bin}:/sbin:/usr/sbin"


Reply to: