[hackers] [wmii] Don't run rc.wmii if its name is not rc.wmii.

From: Kris Maglione <jg_AT_suckless.org>
Date: Sun Mar 25 21:16:51 2007

changeset: 2032:7ce25d709bbe
tag: tip
user: Kris Maglione <jg_AT_suckless.org>
date: Sun Mar 25 15:16:24 2007 -0400
summary: Don't run rc.wmii if its name is not rc.wmii.

diff -r 8fbe9a9e1806 -r 7ce25d709bbe rc/rc.wmii
--- a/rc/rc.wmii Sat Mar 24 18:35:05 2007 -0400
+++ b/rc/rc.wmii Sun Mar 25 15:16:24 2007 -0400
@@ -3,6 +3,11 @@
 
 oldpath=$path
 path=($PLAN9/bin $path)
+
+if(echo $0 | grep -vs '/rc.wmii$') {
+ echo Fatal: This file should only be run as rc.wmii >[1=2]
+ exits badname
+}
 
 MODKEY=Mod1
 UP=k
Received on Sun Mar 25 2007 - 21:16:51 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 15:56:24 UTC