aboutsummaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
authorFrederic Lepied <flepied@mandriva.com>2002-03-06 04:11:58 +0000
committerFrederic Lepied <flepied@mandriva.com>2002-03-06 04:11:58 +0000
commit504ab3efd8740ac442c4aed462bca175ae28c8fb (patch)
tree38fb61946c8f79825da1be19bc062ca70a7c2d08 /share
parent40a29faeeeeafc983028f51e6c17c64117e301c3 (diff)
downloadmsec-504ab3efd8740ac442c4aed462bca175ae28c8fb.tar
msec-504ab3efd8740ac442c4aed462bca175ae28c8fb.tar.gz
msec-504ab3efd8740ac442c4aed462bca175ae28c8fb.tar.bz2
msec-504ab3efd8740ac442c4aed462bca175ae28c8fb.tar.xz
msec-504ab3efd8740ac442c4aed462bca175ae28c8fb.zip
don't run twice
Diffstat (limited to 'share')
-rwxr-xr-xshare/msec20
1 files changed, 20 insertions, 0 deletions
diff --git a/share/msec b/share/msec
index d3e4e51..9a28027 100755
--- a/share/msec
+++ b/share/msec
@@ -6,8 +6,28 @@
# Version : $Id$
# Author : Frederic Lepied
# Created On : Thu Dec 13 11:36:50 2001
+# Purpose : entry script to run hardness script or change
+# the security level.
#---------------------------------------------------------------
+LCK=/var/run/msec.pid
+
+function cleanup() {
+ rm -f $LCK
+}
+
+if [ -f $LCK ]; then
+ if [ -d /proc/`cat $LCK` ]; then
+ exit 0
+ else
+ rm -f $LCK
+ fi
+fi
+
+echo -n $$ > $LCK
+
+trap cleanup 0
+
MSEC=/usr/share/msec/msec.py
OPT=""