From f86e4834452e34d385348934ed2c027c22a6d39c Mon Sep 17 00:00:00 2001 From: krempp Date: Wed, 31 May 2000 11:28:31 +0200 Subject: [PATCH] teste si le rep courant contient "etc", sinon fait cd /etc. darcs-hash:20000531092831-92525-4de36e376177e67c36215bdda50e7e2962d599d3.gz --- supers/etccommit | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/supers/etccommit b/supers/etccommit index 53d242b2..afb72ab2 100755 --- a/supers/etccommit +++ b/supers/etccommit @@ -14,8 +14,14 @@ USER=$ORIG_USER USERNAME=$USER LOGNAME=$ORIG_LOGNAME -cd /etc -echo "logname : " $LOGNAME +cur=$(pwd) +echo $cur +if test "X${cur##/etc}" = "X$cur" ; then #il ya pas 'etc' ds le rep courant. + echo switching dir to /etc + cd /etc +fi + +#echo "logname : " $LOGNAME echo "who am i :" `who am i` # en fait j'ai l'impression que ttes les variables sont ignorées par cvs. # qd on est root, il récupere le vrai user par "who am i", ie par le owner du TTY..