From a0fef68e86b03d11653741a60ed64753d816b7bd Mon Sep 17 00:00:00 2001 From: tv Date: Thu, 11 Aug 2011 01:33:41 +0200 Subject: punani: add minimal arch engineer --- punani/bin/punani | 90 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100755 punani/bin/punani diff --git a/punani/bin/punani b/punani/bin/punani new file mode 100755 index 00000000..7af6f0f8 --- /dev/null +++ b/punani/bin/punani @@ -0,0 +1,90 @@ +#! /bin/sh +# +# punani - filesystem scienteer +# +# Engineering Operations +# -E -i spec insert a package to the target filesystem +# -E -r spec remove a package +# + +godmode() { + if test "${nosudo-false}" != true -a `id -u` != 0; then + echo "Warning: we require god mode..." >&2 + exec sudo "$0" "$@" + exit 23 # go to hell + fi +} + +if pacman --version 2>/dev/null | fgrep -q Pacman; then + system="${system+$system, }arch-like" +fi + +case "$system" in + (*arch-like*) + punani_Engineer_insert() { + pacman -Sy "$1" + } + punani_Engineer_remove() { + pacman -Rcs "$1" + } + ;; + (*) + email='krebs@syntax-fehler.de' + irc_host='irc.freenode.org' + irc_channel='#tincspasm' + cat>&2<&2 + exit 23;; + esac + ;; + (undefined) + case $OPT in + (E) role=Engineer;; + (*) + exit 23;; + esac + ;; + (*) + echo 'Error 1: You are made of stupid!' >&2 + exit 23 + ;; + esac + done +} + +punani "$@" +shift `echo $OPTIND-1 | bc` + +case $role in + (Engineer) godmode;; +esac +for name; do + "$command" "$name" +done -- cgit v1.2.3 From 56c0db6825605e4d5d2c7e697c6d3948e1efc23a Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 12 Aug 2011 14:05:52 +0200 Subject: cholerab ttycnser: move prototype Move the ttycnser shell-script prototype in order to errect the node-based TTY Cholerab Notification Service which is going to listen to JSON-RPC notifications over HTTP. --- cholerab/ttycnser | 27 --------------------------- cholerab/ttycnser.sh | 27 +++++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 27 deletions(-) delete mode 100755 cholerab/ttycnser create mode 100755 cholerab/ttycnser.sh diff --git a/cholerab/ttycnser b/cholerab/ttycnser deleted file mode 100755 index 0972dbbb..00000000 --- a/cholerab/ttycnser +++ /dev/null @@ -1,27 +0,0 @@ -#! /bin/sh -set -euf - -tty="${TMPDIR-/tmp}/ttycnser.$LOGNAME.tty" - -case "${mode-server}" in - (server) - host=0.0.0.0 - port=8080 - export mode=client - echo "ttycnser @ $host $port" >&2 - exec tcpserver $host $port "$0" - ;; - (client) - line="`read line && echo "$line"`" - echo -n '7>>>> '"$line"'8' > "$tty" - ;; - (install) - # TODO tell the user to do something like - # PROMPT_COMMAND="`mode=install ~/p/krebscode/painload/cholerab/ttycnser`" - echo "ln -snf '`tty`' '$tty'" - ;; - (*) - echo 'Error 1: You are made of stupid!' >&2 - exit 23 - ;; -esac diff --git a/cholerab/ttycnser.sh b/cholerab/ttycnser.sh new file mode 100755 index 00000000..0972dbbb --- /dev/null +++ b/cholerab/ttycnser.sh @@ -0,0 +1,27 @@ +#! /bin/sh +set -euf + +tty="${TMPDIR-/tmp}/ttycnser.$LOGNAME.tty" + +case "${mode-server}" in + (server) + host=0.0.0.0 + port=8080 + export mode=client + echo "ttycnser @ $host $port" >&2 + exec tcpserver $host $port "$0" + ;; + (client) + line="`read line && echo "$line"`" + echo -n '7>>>> '"$line"'8' > "$tty" + ;; + (install) + # TODO tell the user to do something like + # PROMPT_COMMAND="`mode=install ~/p/krebscode/painload/cholerab/ttycnser`" + echo "ln -snf '`tty`' '$tty'" + ;; + (*) + echo 'Error 1: You are made of stupid!' >&2 + exit 23 + ;; +esac -- cgit v1.2.3 From 4ff483f4a721b488acaaf30557d1d6168022c42c Mon Sep 17 00:00:00 2001 From: makefu Date: Fri, 12 Aug 2011 15:20:37 +0200 Subject: knut: initial commit knut is the notification toolchain for krebs --- cholerab/knut/README | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 cholerab/knut/README diff --git a/cholerab/knut/README b/cholerab/knut/README new file mode 100644 index 00000000..51b90307 --- /dev/null +++ b/cholerab/knut/README @@ -0,0 +1,2 @@ +KNUT - Krebs Notification Utility Toolchain +=========================================== -- cgit v1.2.3