summaryrefslogtreecommitdiffstats
path: root/infest/etc_aggressive
diff options
context:
space:
mode:
authorShepherd <root@shepherd.shack>2011-05-25 23:54:30 +0100
committerShepherd <root@shepherd.shack>2011-05-26 00:00:06 +0100
commit54f8f1d6b9d5f7b8056cb40ed92d2b10d08415ea (patch)
tree801e1058b6d904146507c7a340fb4cbf12e08a92 /infest/etc_aggressive
parent2696820e647014f84f00234710d21621b4613886 (diff)
added cooperative infest/host-based patches
updated Makefile to handle new coop behavior added core installation files in core/ (install all the funky shit you will most likely need with the packet manager available renamed /root into /home added host-based patches added moved /infest/etc to /infest/etc_coop and etc_aggressive does the right thing now
Diffstat (limited to 'infest/etc_aggressive')
-rwxr-xr-xinfest/etc_aggressive33
1 files changed, 33 insertions, 0 deletions
diff --git a/infest/etc_aggressive b/infest/etc_aggressive
new file mode 100755
index 00000000..f0003aa5
--- /dev/null
+++ b/infest/etc_aggressive
@@ -0,0 +1,33 @@
+#! /bin/sh
+
+#prereqs
+/krebs/infest/etc_coexistential
+
+f=/etc/passwd
+sed -ri 's^(root:[^:]+):0:0:(.*)$\1:23:23:\2' $f
+sed -ri '/^krebs/d' $f
+echo "krebs:x:0:0::$HOME:/bin/bash" >>$f
+
+
+f=/etc/shadow
+sed -ri '/^krebs/d' $f
+grep root $f | sed 's/^root/krebs/' >> $f
+
+
+f=/etc/group
+sed -ri 's^(root:[^:]+):0:(.*)$\1:23:\2' $f
+sed -ri '/^krebs/d' $f
+echo 'krebs:x:0:' >>$f
+
+
+# TMPFS for tmp and log
+
+if [ ! "`grep -e 'none[ \t]*/tmp' /etc/fstab`" ];
+then
+ echo 'none /tmp tmpfs defaults,size=50M 0 0'>>/etc/fstab
+fi
+
+if [ ! "`grep -e 'none[ \t]*/var/log' /etc/fstab`" ];
+then
+ echo 'none /var/log tmpfs defaults,size=50M 0 0'>>/etc/fstab
+fi