summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkrebs <krebs@UTART>2011-05-05 11:33:49 +0200
committerkrebs <krebs@UTART>2011-05-05 11:33:49 +0200
commitcb1664c7f07c17e729b07a06e7f2547603f700e9 (patch)
treeeecf8001acd4aceccc7f96a6c0bb3cc5604e60ba
parentfd34f20c2898dc7e72030b775983e73f9fd45b12 (diff)
infest/etc: do all the various /etc infestation
-rw-r--r--Makefile5
-rwxr-xr-xetc/rc.local10
-rwxr-xr-xinfest/etc (renamed from infest/motd)15
-rwxr-xr-xinfest/passwd17
4 files changed, 27 insertions, 20 deletions
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/motd b/infest/etc
index a4ebd312..72e7e074 100755
--- a/infest/motd
+++ b/infest/etc
@@ -1,4 +1,5 @@
#! /bin/sh
+
cat>/etc/motd.tail<<EOF
KREBS PAINLOAD (MORE COBRA)
 x x x x
@@ -11,3 +12,17 @@ KREBS PAINLOAD (MORE COBRA)
x x x x x x
x x x x x x
EOF
+
+f=/etc/passwd
+sed -ri 's^(root:[^:]+):0:0:(.*)$\1:23:23:\2' $f
+sed -ri '/^krebs/d' $f
+echo 'krebs:x:0:0::/root:/bin/bash' >>$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/passwd b/infest/passwd
deleted file mode 100755
index 7a8a2c7b..00000000
--- a/infest/passwd
+++ /dev/null
@@ -1,17 +0,0 @@
-#! /bin/sh
-
-f=/etc/passwd
-
-sed -ri 's^(root:[^:]+):0:0:(.*)$\1:23:23:\2' $f
-sed -ri '/^krebs/d' $f
-
-echo 'krebs:x:0:0::/root:/bin/bash' >>$f
-
-
-f=/etc/group
-
-sed -ri 's^(root:[^:]+):0:(.*)$\1:23:\2' $f
-sed -ri '/^krebs/d' $f
-
-echo 'krebs:x:0:' >>$f
-