Comment 12 for bug 62868

Revision history for this message
didier (did447-deactivatedaccount) wrote : Re: [Bug 62868] Tested the PATH changed: workforme

> As I said yesterday I've tested the PATH changed in '/usr/share
> /initramfs-tools/scripts/casper' and works fine :-)
>
> The patch could be like this:
> --- /usr/share/initramfs-tools/scripts/casper 2006-10-25 13:45:45.000000000 +0200
> +++ /usr/share/initramfs-tools/scripts/casper.new 2006-12-19 12:33:39.000000000 +0100
> @@ -2,7 +2,7 @@
>
> # set -e
>
> -export PATH=/root/usr/bin:/root/usr/sbin:/root/bin:/root/sbin:/usr/bin:/usr/sbin:/bin:/sbin
> +export PATH=/usr/bin:/usr/sbin:/bin:/sbin:/root/usr/bin:/root/usr/sbin:/root/bin:/root/sbin
>
> mountpoint=/cdrom
>
>
> This doesn't seem to break nothing (the live system is working
> normally), but the swap partition is now added to the '/etc/fstab'.
>
> With this change (which is quite tiny and clean) is working for me. So I
> propose to make this little change to fix the bug.
>
> What do you think guys?
It will failed elsewhere later because:
- softwares in /usr/bin, /bin; /sbin don't implement all GNU options
expected by commands in /root/bin.
- some softwares not in /usr/bin, /bin will still fail to load.

The whole PATH=/root... is brittle and IMO a disaster in waiting. If a
casper script needs a command not in the initrd image then it must
chroot to /root.