diff options
author | makefu <github@syntax-fehler.de> | 2011-08-13 16:21:36 +0200 |
---|---|---|
committer | makefu <github@syntax-fehler.de> | 2011-08-13 16:21:36 +0200 |
commit | 6ed646ab7a7c6eb56afad481616d50805a6925ef (patch) | |
tree | febaa982e7c4d5c50b145ad781fae2c45346eeb3 | |
parent | 69a7689fc33e1d505c06ae81d7a782d53196da9f (diff) | |
parent | 85462282161317ba0b99a08dcd118e6172cd8b9d (diff) |
Merge branch 'master' of github.com:krebscode/painload
Conflicts:
cholerab/AGENDA.cccamp11
-rw-r--r-- | cholerab/AGENDA.cccamp11 | 12 | ||||
-rwxr-xr-x | cholerab/knut/clients/cnot/index | 10 | ||||
-rw-r--r-- | lib/Makefile | 9 | ||||
-rw-r--r-- | lib/libkrebs.sh | 10 |
4 files changed, 32 insertions, 9 deletions
diff --git a/cholerab/AGENDA.cccamp11 b/cholerab/AGENDA.cccamp11 index 1841471e..6e6f7b84 100644 --- a/cholerab/AGENDA.cccamp11 +++ b/cholerab/AGENDA.cccamp11 @@ -3,12 +3,9 @@ - krebs.no.de/hosts.tar automatic via github POST hook - same for supernode updates [vs. cron] - krebscode/painload/supernode/foo - DONE - hosts in krebs/retiolum - DONE - update hosts from painload via `make -C retiolum` - overall - DONE - PATH-able bin/ - - bin at the end of PATH + - krebs/bin at the end of PATH - natural voices - unify with translate.google @@ -30,13 +27,13 @@ DONE - curl painload.retiolum | sh [- git clone https://github.com/kreingbscode/painload /krebs] [- /krebs/boot] (makefu) + - krebs rebootstrapping - server, der ein shellscript [wenn User-Agent: curl/wget ist] ausgibt] (tv) - painload/{component}/krebs.manifest - welche kategorie: gutartig, boesartig,auf toeten eingestellt, optional DONE - interactive-foo, der am Anfang durchgespielt werden muss - danach darf er nciht mehr sucken, und muss das richtige tun - initiale config file via $EDITOR - DONE - config am anfang des skriptes oeffnen - config auswerten - gutartiger Krebs @@ -55,8 +52,6 @@ - ftp MOTD - sound theme [see beeps below] - append to PATH - DONE - morse (makefu) - DONE - beep installieren und shit [spaeter kuebelwagen, wenn beep defekt] [- boesartiger Krebs] - public keys installieren @@ -94,3 +89,6 @@ - beeps - on ssh activity + + - POSIX-sh krebs harder + - http://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html diff --git a/cholerab/knut/clients/cnot/index b/cholerab/knut/clients/cnot/index index d17329f4..f276dd25 100755 --- a/cholerab/knut/clients/cnot/index +++ b/cholerab/knut/clients/cnot/index @@ -2,7 +2,7 @@ # # cnot - cholerab live command line notification client, bitch! # -# usage: cnot hostname message... +# usage: [verbose=yes] cnot hostname [message...] # set -euf @@ -11,6 +11,12 @@ port=42101 params="$*" -exec curl -vsS -X PUT --data-binary @- "http://$host:$port" <<EOF +flags=-sS + +if test "${verbose-no}" != no; then + flags="${flags+$flags }-v" +fi + +exec curl $flags -X PUT --data-binary @- "http://$host:$port" <<EOF {"method":"clive","params":"$params","id":null} EOF diff --git a/lib/Makefile b/lib/Makefile new file mode 100644 index 00000000..4d33995f --- /dev/null +++ b/lib/Makefile @@ -0,0 +1,9 @@ + + +.PHONY: all install +all: select-target + +install: ../bin/libkrebs.sh + +../bin/libkrebs.sh: libkrebs.sh + ln -vsnf ../lib/$< $@ diff --git a/lib/libkrebs.sh b/lib/libkrebs.sh new file mode 100644 index 00000000..d423a053 --- /dev/null +++ b/lib/libkrebs.sh @@ -0,0 +1,10 @@ +#! /bin/sh +esudo() { + if test "${esudo-true}" = true -a `id -u` != 0; then + echo "we're going sudo..." >&2 + export esudo=false + exec sudo "$0" "$@" + exit 23 # go to hell + fi +} + |