diff options
author | mtm <mtm@FreeBSD.org> | 2004-02-27 10:44:33 +0000 |
---|---|---|
committer | mtm <mtm@FreeBSD.org> | 2004-02-27 10:44:33 +0000 |
commit | 9c0d0ba7c86b64d8a30376d5222c361348fd8c1e (patch) | |
tree | 30f354924c60dd5d664a88135a10b94f2375c81f /etc/rc | |
parent | cc042ab91ed1a452d264063f8e0711db1cf56988 (diff) | |
download | FreeBSD-src-9c0d0ba7c86b64d8a30376d5222c361348fd8c1e.zip FreeBSD-src-9c0d0ba7c86b64d8a30376d5222c361348fd8c1e.tar.gz |
o Add support for detecting a jailed environment. If a script
cannot or does not want to be executed in a jail the
KEYWORDS line should contain the nojail keyword.
o Update Copyright
# I suggest people who use jails more extensively than I do
# make commits to the appropriate files.
Diffstat (limited to 'etc/rc')
-rw-r--r-- | etc/rc | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2000 The FreeBSD Project +# Copyright (c) 2000-2004 The FreeBSD Project # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -66,7 +66,9 @@ else fi os=`eval ${CMD_OSTYPE}` -files=`rcorder -k ${os} -s nostart /etc/rc.d/* 2>/dev/null` +skip="nostart" +[ `/sbin/sysctl -n security.jail.jailed` -eq 1 ] && skip="$skip nojail" +files=`rcorder -k ${os} -s ${skip} /etc/rc.d/* 2>/dev/null` for _rc_elem in ${files}; do run_rc_script ${_rc_elem} ${_boot} |