diff options
| author | Roy Marples <roy@marples.name> | 2020-01-21 22:09:14 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2020-01-21 22:09:14 +0000 |
| commit | b2888271d79d39d972db7746f5d4ecdcf1372586 (patch) | |
| tree | fbcd58ce9f268aa0ab1bde7d1cb7317a97a2aa6d /hooks | |
| parent | a6178d6a904eff4e5fcb4cef268045e9c4e9d918 (diff) | |
| download | dhcpcd-b2888271d79d39d972db7746f5d4ecdcf1372586.tar.xz | |
Linux: setup mounts in chroot
This allows dhcpcd to work.
udev sadly requires /run/udev as well, so heh ho.
Diffstat (limited to 'hooks')
| -rw-r--r-- | hooks/00-linux | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/hooks/00-linux b/hooks/00-linux new file mode 100644 index 00000000..b3bf1f50 --- /dev/null +++ b/hooks/00-linux @@ -0,0 +1,11 @@ +# setup chroot mounts + +if [ "$reason" = CHROOT ] && [ -n "$chroot" ]; then + for d in /dev /proc /sys /run/udev; do + [ -d "$d" ] || continue + if ! mountpoint -q "$chroot$d"; then + mkdir -p "$chroot$d" + mount --bind $d "$chroot$d" + fi + done +fi |
