diff options
author | csjp <csjp@FreeBSD.org> | 2005-04-30 00:16:00 +0000 |
---|---|---|
committer | csjp <csjp@FreeBSD.org> | 2005-04-30 00:16:00 +0000 |
commit | 86d0205844796934698008df7afe4d8e28b1add1 (patch) | |
tree | 8ea07b0b7763d535aff6eb73f5acbd74bd54175f /etc/rc.d/jail | |
parent | 02891f1c55fa404da07d9fecfbd859b48ab3a2f7 (diff) | |
download | FreeBSD-src-86d0205844796934698008df7afe4d8e28b1add1.zip FreeBSD-src-86d0205844796934698008df7afe4d8e28b1add1.tar.gz |
Do not unconditionally mount devfs to ${jail_devdir}/dev. First check
to see if a prior devfs has been mounted. If no devfs is mounted on
${jail_devdir}/dev then proceed. This will prevent the stack up of
multiple devfs mounts on the same mount point.
Discussed with: pjd
MFC after: 1 week
Diffstat (limited to 'etc/rc.d/jail')
-rw-r--r-- | etc/rc.d/jail | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/etc/rc.d/jail b/etc/rc.d/jail index 9ad638f..983ff3b 100644 --- a/etc/rc.d/jail +++ b/etc/rc.d/jail @@ -163,15 +163,18 @@ jail_start() mount -a -F "${jail_fstab}" fi if checkyesno jail_devfs; then - info "Mounting devfs on ${jail_devdir}" - devfs_mount_jail "${jail_devdir}" ${jail_ruleset} - - # Transitional symlink for old binaries - if [ ! -L "${jail_devdir}/log" ]; then - __pwd="`pwd`" - cd "${jail_devdir}" - ln -sf ../var/run/log log - cd "$__pwd" + # If devfs is already mounted here, skip it. + df -t devfs "${jail_devdir}" >/dev/null + if [ $? -ne 0 ]; then + info "Mounting devfs on ${jail_devdir}" + devfs_mount_jail "${jail_devdir}" ${jail_ruleset} + # Transitional symlink for old binaries + if [ ! -L "${jail_devdir}/log" ]; then + __pwd="`pwd`" + cd "${jail_devdir}" + ln -sf ../var/run/log log + cd "$__pwd" + fi fi # XXX - It seems symlinks don't work when there |