Magellan Linux

Annotation of /trunk/magellan-initscripts/etc/rc.d/init.d/cleanfs

Parent Directory Parent Directory | Revision Log Revision Log


Revision 71 - (hide annotations) (download)
Tue Mar 15 19:07:56 2005 UTC (19 years, 1 month ago) by niro
File size: 959 byte(s)
updated header and fixed whitespaces

1 niro 2 #!/bin/bash
2 niro 71 # $Header: /home/cvsd/magellan-cvs/magellan-src/magellan-initscripts/etc/rc.d/init.d/cleanfs,v 1.3 2005-03-15 19:07:50 niro Exp $
3 niro 2
4     #%rlevels: 7:s
5     #%start: 50
6     #%stop:
7    
8     #deps
9     #%needs:
10     #%before:
11     #%after:
12    
13     source /etc/sysconfig/rc
14     source $rc_functions
15    
16     echo -e ${COLOREDSTAR}"Removing /var/run/* and /var/lock/* ..."
17     for i in /var/run/*
18     do
19     if [ -d ${i} ]
20     then
21     rm -rf ${i}/*
22     else
23     rm -f ${i}
24     fi
25     done
26    
27     for i in /var/lock/*
28     do
29     if [ -d ${i} ]
30     then
31     rm -rf ${i}/*
32     else
33     rm -f ${i}
34     fi
35     done
36     evaluate_retval
37    
38     echo -e ${COLOREDSTAR}"Creating new /var/run/utmp ..."
39     touch /var/run/utmp && chmod 644 /var/run/utmp
40     evaluate_retval
41    
42 niro 47 echo -e ${COLOREDSTAR}"Creating new /var/run/wtmp ..."
43     touch /var/log/wtmp && chmod 644 /var/log/wtmp
44     evaluate_retval
45    
46 niro 2 echo -e ${COLOREDSTAR}"Removing possible /etc/nologin /fastboot and /forcefsck ..."
47     rm -f /etc/nologin /fastboot /forcefsck
48     evaluate_retval
49    
50     update_svcstatus $1
51     splash svc_started "$(basename $0)" 0

Properties

Name Value
svn:executable *