Problem
When I run the cleantmp script it removes random files from any currently mounted filesystems.
Cause
Cleantmp doesn't use the "-local" option in its "find" command; it will affect all mounted filesystems whether local or remote. These filesystems could have been mounted as a result of the on(NC) command, a previous mount(ADM) command, or a user using mnt(C).
Solution
The -local option must be added to the find command in the cleantmp script.
Log in as root. Using a text editor such as vi(C), edit the
file /usr/lib/cleantmp.In SCO OpenServer Release 5.0, there will be two entries that need
to be edited. In SCO Open Server Release 3.0 or SCO UNIX System
V/386 Release 3.2 Operating System Version 4.2 with SCO TCP/IP Runtime System Release 1.2.1 added on, there will be one.In SCO OpenServer Release 5.0, find the following two entries and add the "-local" option as indicated:
First entry:if [ "$DIROPT" = TRUE ]
thenChange the text that reads:tmpdirs="$tmpdirs `/bin/find $i -type d -mtime +$days
-depth -print`"to read:tmpdirs="$tmpdirs `/bin/find $i -local -type d -mtime +$days
-depth -print`"Second entry:Change the text that reads:/bin/find $i ! -type p ! -type d -atime +$days -exec
/bin/rm -f {} \;to read:/bin/find $i ! -type p ! -local -type d -atime +$days -exec
/bin/rm -f {} \;Save and exit this file.In SCO OpenDesktop Release 3.0, find the following entry and add the -local option as indicated:
if [ -d $i ]
thenChange the text that reads: find $i -atime +$days -exec rm -f {} \;
elseto read:find $i -local -atime +$days -exec rm -f {} \;Save and exit this file. See also
cleantmp(ADM)