check for jailed environment for adjkerntz
Pawel Jakub Dawidek
pjd at FreeBSD.org
Mon Mar 1 20:55:32 UTC 2010
On Mon, Mar 01, 2010 at 02:15:41AM +0300, Subbsd wrote:
> jail with "complete" type have standard crontab a file of tasks. However not
> all standard task are adapted for work in jail an environment. For example
> adjkerntz which generates
>
> adjkerntz [46733]: sysctl (set: "machdep.wall_cmos_clock"): Operation not
> permitted
>
> I suggest to give adjkerntz concept about jail in which to it it is not
> necessary to work:
[...]
I also always was finding that annoying, but only your e-mail made me to
think about ways to fix it and that maybe simple patch like the one
below will do?
--- etc/crontab (wersja 204363)
+++ etc/crontab (kopia robocza)
@@ -22,4 +22,4 @@
#
# Adjust the time zone if the CMOS clock keeps local time, as opposed to
# UTC time. See adjkerntz(8) for details.
-1,31 0-5 * * * root adjkerntz -a
+1,31 0-5 * * * root [ `sysctl -n security.jail.jailed` -eq 0 ] && adjkerntz -a
--
Pawel Jakub Dawidek http://www.wheel.pl
pjd at FreeBSD.org http://www.FreeBSD.org
FreeBSD committer Am I Evil? Yes, I Am!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20100301/4f7ca95d/attachment.pgp
More information about the freebsd-current
mailing list