Date: Fri, 23 Dec 2005 05:15:42 +0200 From: Giorgos Keramidas <keramida@FreeBSD.org> To: Doug Barton <dougb@FreeBSD.org> Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/etc/rc.d cleartmp Message-ID: <20051223031542.GA1580@flame.pc> In-Reply-To: <200512202322.jBKNMljh042547@repoman.freebsd.org> References: <200512202322.jBKNMljh042547@repoman.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 2005-12-20 23:22, Doug Barton <dougb@FreeBSD.org> wrote:
> dougb 2005-12-20 23:22:47 UTC
>
> FreeBSD src repository
>
> Modified files:
> etc/rc.d cleartmp
> Log:
> Include a somewhat hackish way to make sure that we *always* test the
> new clear_tmp_X variable when start'ing.
>
> Revision Changes Path
> 1.15 +6 -1 src/etc/rc.d/cleartmp
This doesn't seem to work too well though. Revision 1.12 of cleartmp
correctly creates .ICE-unix and the other X11 socket dirs in /tmp in my
mfs /tmp filesystem. Newer revisions fail to do this, for two reasons:
The cleartmp_prestart() function runs only when the script runs with
$1 set to 'start', but the boot process calls the script with
'faststart'.
Even when I change cleartmp to recognise faststart, onestart, start
and forcestart, the cleartmp_prestart() function runs before
cleartmp_start(), creates the directories, only to have them deleted
immediately by cleartmp_start() when run_rc_command is called.
I'm not sure if there's a good way to modify cleartmp to do both things
correctly, at least without something equally hackish like:
run_rc_command "$@" || exit $?
case $1 in
start|faststart|forcestart|onestart)
clear_tmp_prestart
;;
esac
or if it's better to make two cleartmp scripts :-/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20051223031542.GA1580>
