summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugues Hiegel <hugues@hiegel.fr>2009-02-05 16:38:09 +0100
committerHugues Hiegel <hugues@hiegel.fr>2009-02-05 16:38:09 +0100
commita4579bc4f5cfe68d5b7a6d9ff1109a114958983c (patch)
treebcddc6b839592734a049dc35d4e9766a30235171
parenta5efacfc5a6a602ea5a0f67df2883da713e9fc2a (diff)
[GnuPG] Encrypts some *.zsh files...
-rw-r--r--net:osn.sagem/user:root/Exec.gpgbin0 -> 485 bytes
-rw-r--r--net:osn.sagem/user:root/Exec.zsh3
-rw-r--r--zshrc8
3 files changed, 7 insertions, 4 deletions
diff --git a/net:osn.sagem/user:root/Exec.gpg b/net:osn.sagem/user:root/Exec.gpg
new file mode 100644
index 0000000..577878e
--- /dev/null
+++ b/net:osn.sagem/user:root/Exec.gpg
Binary files differ
diff --git a/net:osn.sagem/user:root/Exec.zsh b/net:osn.sagem/user:root/Exec.zsh
deleted file mode 100644
index 6522a96..0000000
--- a/net:osn.sagem/user:root/Exec.zsh
+++ /dev/null
@@ -1,3 +0,0 @@
-
-< /var/log/sudo.log sed 's/^\([^ ]\)/---> \1/' | awk 'BEGIN { RS="---> " ; FS=" ;" } ! /COMMAND=\/usr\/bin\/zsh/ { printf $0 }' > /var/log/.sudo.log && mv -f /var/log/.sudo.log /var/log/sudo.log
-
diff --git a/zshrc b/zshrc
index e39d09d..b27453c 100644
--- a/zshrc
+++ b/zshrc
@@ -60,12 +60,18 @@ if [ -d $ZDOTDIR ]; then
"host:$HOST/user:$SUDO_USER"
do
specific_script=${script:h}/$i/${${script:t}/??_/}
- if test -f $specific_script
+ if test -f $specific_script
then
[ "$DEBUG" = "yes" ] && echo -n "$i/${${specific_script:t:r}/??_/}... ";
source $specific_script
[ "$DEBUG" = "yes" ] && echo
fi
+ if test -f $specific_script:r.gpg
+ then
+ [ "$DEBUG" = "yes" ] && echo -n "$i/${${specific_script:t:r}/??_/}... ";
+ gpg --decrypt $specific_script | source
+ [ "$DEBUG" = "yes" ] && echo
+ fi
done
done
fi