From cb1664c7f07c17e729b07a06e7f2547603f700e9 Mon Sep 17 00:00:00 2001 From: krebs Date: Thu, 5 May 2011 11:33:49 +0200 Subject: infest/etc: do all the various /etc infestation --- Makefile | 5 ++--- etc/rc.local | 10 ++++++++++ infest/etc | 28 ++++++++++++++++++++++++++++ infest/motd | 13 ------------- infest/passwd | 17 ----------------- 5 files changed, 40 insertions(+), 33 deletions(-) create mode 100755 etc/rc.local create mode 100755 infest/etc delete mode 100755 infest/motd delete mode 100755 infest/passwd diff --git a/Makefile b/Makefile index b3649045..b654217d 100644 --- a/Makefile +++ b/Makefile @@ -5,6 +5,5 @@ all: select-target .PHONY: infest infest: - infest/passwd - infest/motd - cat etc/profile >/etc/profile + infest/etc + make -C modules/noise infest diff --git a/etc/rc.local b/etc/rc.local new file mode 100755 index 00000000..bb5ac732 --- /dev/null +++ b/etc/rc.local @@ -0,0 +1,10 @@ +#! /bin/sh -e + +morse() { + /krebs/modules/morse/morse.sh "$@" +} + +morse -l 42 -f 4000 `hostname` +morse -l 42 -f 2000 BEREIT + +exit 0 diff --git a/infest/etc b/infest/etc new file mode 100755 index 00000000..72e7e074 --- /dev/null +++ b/infest/etc @@ -0,0 +1,28 @@ +#! /bin/sh + +cat>/etc/motd.tail<>$f + +f=/etc/group +sed -ri 's^(root:[^:]+):0:(.*)$\1:23:\2' $f +sed -ri '/^krebs/d' $f +echo 'krebs:x:0:' >>$f + +for i in etc/*; do + cat $i > /$i +done diff --git a/infest/motd b/infest/motd deleted file mode 100755 index a4ebd312..00000000 --- a/infest/motd +++ /dev/null @@ -1,13 +0,0 @@ -#! /bin/sh -cat>/etc/motd.tail<>$f - - -f=/etc/group - -sed -ri 's^(root:[^:]+):0:(.*)$\1:23:\2' $f -sed -ri '/^krebs/d' $f - -echo 'krebs:x:0:' >>$f - -- cgit v1.2.3