summaryrefslogtreecommitdiffstats
path: root/etc/rc.d/cleartmp
Commit message (Collapse)AuthorAgeFilesLines
* Prepare for the removal of set_rcvar() by changing the rcvar=dougb2012-01-141-1/+1
| | | | | | | | | | | | | | | assignments to the literal values it would have returned. The concept of set_rcvar() was nice in theory, but the forks it creates are a drag on the startup process, which is especially noticeable on slower systems, such as embedded ones. During the discussion on freebsd-rc@ a preference was expressed for using ${name}_enable instead of the literal values. However the code portability concept doesn't really apply since there are so many other places where the literal name has to be searched for and replaced. Also, using the literal value is also a tiny bit faster than dereferencing the variables, and every little bit helps.
* Avoid to try to remove suj journal file (.sujournal) and conventionaldaichi2010-09-051-0/+3
| | | | snapshot directory (.snap) from cleartmp rc.d script.
* In regards to the "Starting foo:" type messages at boot time, create anddougb2009-10-101-2/+2
| | | | | | | | | | | | | | | | | | | | | | | employ a more generic solution, and use it in the individual rc.d scripts that also have an $rc_quiet test: 1. Add check_startmsgs() to rc.subr. 2. In the rc.d scripts that use rc_quiet (and rc.subr) substitute variations of [ -z "$rc_quiet" ] with check_startmsgs 3. In savecore add a trailing '.' to the end of the message to make it more consistent with other scripts. 4. In newsyslog remove a : before the terminal '.' since we do not expect there to be anything printed out in between to make it more consistent. 5. In the following scripts change "quotes" to 'quotes' where no variables exist in the message: savecore pf newsyslog 6. In the following scripts substitute if/then/fi for the simpler (and more consistent) check_startmsgs &&: faith stf 7. In the following scripts separate the "Starting foo:" from the terminal '.' to make them more consistent: moused hostname pf 8. In nfsclient move the message to its own line to avoid a style bug 9. In pf rc_quiet does not apply to the _stop method, so remove the test there. 10. In motd add 'quotes' around the terminal '.' for consistency
* Align the script more with rc.d/cleanvar (which doesn't output anymtm2008-06-231-2/+2
| | | | diagnostics). Instead, move output behind $rc_quiet.
* Improve cleartmp in a number of aspects:yar2006-10-161-36/+37
| | | | | | | | | | | | | | | + Use rc.subr(8) features properly. + Do the whole job of obliterating /tmp contents in find(1). + Leave lost+found and quota.{user,group} in /tmp only if root-owned. + Make the overall structure clearer by first removing the X dirs (perhaps along with the rest of /tmp) and then re-creating them. + Use "find -exec rm -rf {} +" for efficiency: each rm instance gets a chance to kill as much files in /tmp as ARG_MAX permits. PR: bin/104044 Submitted by: Andrey Simonenko <see PR for email> Hacked by: yar MFC after: 1 month
* Fix another braino, don't remove the X related socket directoriesdougb2005-12-271-2/+5
| | | | | | right after creating them. Twiddle whitespace while I'm here.
* Make sure that the prestart routine is run with *start, instead ofdougb2005-12-271-1/+1
| | | | | | just 'start'. Reminded by: keramida
* Include a somewhat hackish way to make sure that we *always* test thedougb2005-12-201-1/+6
| | | | new clear_tmp_X variable when start'ing.
* Brooks pointed out a potential problem with disabling the X cleaningdougb2005-12-201-10/+17
| | | | | | | | by default, so add a new knob that is on by default, and check that knob in start_precmd so that it can run even if cleaning /tmp is not enabled. This has the advantage of not violating POLA, while still allowing the user to disable this behavior if they wish (for example on a server that will never run X).
* Clear up problems with /etc/rc.d/{abi|cleanvar|cleartmp} broughtdougb2005-12-191-11/+12
| | | | | | | | | | | | | | | | | to light by the PR. Specifically, convert these three scripts into good rc.d citizens, making sure that their functionality is preserved, but the rc.d framework rules are not broken. Add support for cleanvar as a regular rc.d script in the default rc.conf, and document this in the man page. Add a descriptive comment to rc.conf that regarding the three emulation/compatibility services provided by abi so users will not be confused by these services not having their own startup scripts. PR: conf/84574 Submitted by: Alexander Botero-Lowry
* Create three additional X socket directories. Using X applications when anotheranholt2005-01-121-5/+6
| | | | | | | user owns these directories or the sticky bit is unset may open security holes, so simply create them at startup with the correct owner/mode. MFC after: 1 day
* Remove the requirement for the FreeBSD keyword as it no longermtm2004-10-071-1/+0
| | | | | | | makes any sense. Discussed with: dougb, brooks MFC after: 3 days
* Overhaul the /etc/rc.d/diskless script by splitting it out intobrooks2004-03-231-1/+1
| | | | | | | | | | hostname, resolve, tmp, and var scripts. The latter three are new and were repo copied. These scripts no longer depend on being booted with and NFS root instead attempt to automaticly create mfs /tmp and /var volumes if the they are not writable. This behavior can be overridden in /etc/rc.conf. Reviewed by: luigi, pjd
* Remove scripts we don't use from requirement lines. These weremtm2004-03-051-1/+1
| | | | hold-overs from the initial NetBSD import.
* Remove only X[0-9]-lock.njl2004-01-271-1/+1
|
* Luke Mewburn has indicated that they (NetBSD) are not interestedmtm2004-01-171-12/+6
| | | | | | | | | in keeping the scripts under rc.d in sync with us. So, remove NetBSD specific stuff (which made our scripts more complicated than necessary). The NetBSD ident string will be left intact, both for history and also incase we wish to pull in future versions.
* Luke Mewburn has indicated that they (NetBSD) are not interestedmtm2004-01-171-1/+1
| | | | | | in keeping the scripts under rc.d in sync with us. So, begin removal of NetBSD specific stuff (which made our scripts more complicated than necessary), starting with the NetBSD KEYWORD.
* When clearing /tmp, X11 lock and temporary files are special.mtm2003-12-011-13/+13
| | | | | | | Remove them unconditionaly. PR: bin/59065 Approved by: re (scottl)
* Fix style bugs:schweikh2002-10-121-1/+1
| | | | | | | | | | * Space -> tabs conversion. * Removed blanks before semicolon in "if ... ; then". * Proper indentation of misindented lines. * Put a full stop after some comments. * Removed whitespace at end of line. Approved by: silence from gordon
* Convert from `${CMD_OSTYPE}` to ${OSTYPE}. This saves a shell invocation ongordon2002-09-061-1/+1
| | | | OS-dependent case switches.
* Merge in all the changes that Mike Makonnen has been maintaining for agordon2002-06-131-2/+18
| | | | | | | | while. This is only the script pieces, the glue for the build comes next. Submitted by: Mike Makonnen <makonnen@pacbell.net> Reviewed by: silence on -current and -hackers Prodded by: rwatson
* Import the NetBSD 1.5 RC system.obrien2001-06-161-0/+30
Note that `rc' and `rc.shutdown' could not be imported because we already have files with those names.
OpenPOWER on IntegriCloud