diff options
author | matteo <matteo@FreeBSD.org> | 2006-05-11 13:29:01 +0000 |
---|---|---|
committer | matteo <matteo@FreeBSD.org> | 2006-05-11 13:29:01 +0000 |
commit | 57f8bd589684230bebf5a9cb58756523ca63eff7 (patch) | |
tree | 54046edd0b1e3ccf400fe9d1ed7d7eabd79d28c4 /etc/rc.d/jail | |
parent | e3299095ec06bd390f18e58c9afdded62c00051b (diff) | |
download | FreeBSD-src-57f8bd589684230bebf5a9cb58756523ca63eff7.zip FreeBSD-src-57f8bd589684230bebf5a9cb58756523ca63eff7.tar.gz |
if we fail to start a jail and jail_foobar_*fs_enable or jail_foobar_mount_enable were set, umount those filesystem before exiting. If we set up an alias for jail's IP, remove that alias before exiting.
MFC after: 2 weeks
Diffstat (limited to 'etc/rc.d/jail')
-rw-r--r-- | etc/rc.d/jail | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/etc/rc.d/jail b/etc/rc.d/jail index 3b4a4a5..7551a18 100644 --- a/etc/rc.d/jail +++ b/etc/rc.d/jail @@ -227,6 +227,10 @@ jail_start() tail +2 ${_tmp_jail} >${jail_rootdir}/var/log/console.log echo ${_jail_id} > /var/run/jail_${_jail}.id else + jail_umount_fs + if [ -n "${jail_interface}" ]; then + ifconfig ${jail_interface} -alias ${jail_ip} + fi echo " cannot start jail \"${_jail}\": " tail +2 ${_tmp_jail} fi |