Bug#710709: debootstrap: consider creating (dangling) /etc/mtab symlink
On Tue, 30 Apr 2019 at 13:03, Hideki Yamane <henrich@iijmio-mail.jp> wrote:
> + if [ ! -f "$TARGET/etc/mtab" ]; then
> + if [ -L "$TARGET/proc/self" ]; then
> + cd "$TARGET/etc" && ln -s ../proc/self/mounts mtab
> + elif [ -f "$TARGET/proc/mounts" ]; then
> + cd "$TARGET/etc" && ln -s ../proc/mounts mtab
> + fi
> + fi
Not sure I understand the motivation for the "cd" invocations here --
just making a symlink shouldn't need that, right?
| ln -s ../proc/self/mounts "$TARGET/etc/mtab"
(Since a symlink is essentially just a special-typed plain text file
and "ln -s" doesn't really care about the working directory except for
interpreting the final target argument if it's relative.)
♥,
- Tianon
4096R / B42F 6819 007F 00F8 8E36 4FD4 036A 9C25 BF35 7DD4
Reply to: