summaryrefslogtreecommitdiffstats
path: root/filehooker/root-image
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2014-03-24 18:40:53 +0100
committermakefu <github@syntax-fehler.de>2014-03-24 18:40:53 +0100
commit1610072ff0aac8de91c7bf3919bfd75b5fba0e6c (patch)
treec6b7676151256c37aa2e5d7d7dc05471734fa4b9 /filehooker/root-image
parent416559761c751427c0b4116145575e0965283857 (diff)
add all the minor tweaks to filehooker
Diffstat (limited to 'filehooker/root-image')
-rw-r--r--filehooker/root-image/etc/systemd/system/Reaktor@reaktor.service.d/wait.service2
-rw-r--r--filehooker/root-image/etc/systemd/system/getty@tty1.service.d/autologin.conf3
-rw-r--r--filehooker/root-image/etc/systemd/system/start-ncdc@hooker.service.d/wait.service2
-rwxr-xr-xfilehooker/root-image/root/customize_root_image.sh10
4 files changed, 10 insertions, 7 deletions
diff --git a/filehooker/root-image/etc/systemd/system/Reaktor@reaktor.service.d/wait.service b/filehooker/root-image/etc/systemd/system/Reaktor@reaktor.service.d/wait.service
new file mode 100644
index 00000000..45a9b4c8
--- /dev/null
+++ b/filehooker/root-image/etc/systemd/system/Reaktor@reaktor.service.d/wait.service
@@ -0,0 +1,2 @@
+[service]
+ExecStartPre=/usr/bin/sleep 20
diff --git a/filehooker/root-image/etc/systemd/system/getty@tty1.service.d/autologin.conf b/filehooker/root-image/etc/systemd/system/getty@tty1.service.d/autologin.conf
deleted file mode 100644
index 5c6618c5..00000000
--- a/filehooker/root-image/etc/systemd/system/getty@tty1.service.d/autologin.conf
+++ /dev/null
@@ -1,3 +0,0 @@
-[Service]
-ExecStart=
-#ExecStart=-/sbin/agetty --autologin root --noclear %I 38400 linux
diff --git a/filehooker/root-image/etc/systemd/system/start-ncdc@hooker.service.d/wait.service b/filehooker/root-image/etc/systemd/system/start-ncdc@hooker.service.d/wait.service
new file mode 100644
index 00000000..45a9b4c8
--- /dev/null
+++ b/filehooker/root-image/etc/systemd/system/start-ncdc@hooker.service.d/wait.service
@@ -0,0 +1,2 @@
+[service]
+ExecStartPre=/usr/bin/sleep 20
diff --git a/filehooker/root-image/root/customize_root_image.sh b/filehooker/root-image/root/customize_root_image.sh
index 97f625ee..11912644 100755
--- a/filehooker/root-image/root/customize_root_image.sh
+++ b/filehooker/root-image/root/customize_root_image.sh
@@ -3,7 +3,7 @@
set -e -u -f -x
reaktor_user=reaktor
ncdc_user=hooker
-
+rootpw=$(dd if=/dev/urandom count=1 bs=128 | base64 -w0)
sed -i 's/#\(en_US\.UTF-8\)/\1/' /etc/locale.gen
locale-gen
@@ -46,13 +46,15 @@ test ! -e /krebs/painload/Reaktor && \
useradd $reaktor_user || :
## needed to see the hidden service hostname
-echo "$reaktor_user ALL=(tor) NOPASSWD: /krebs/bin/tor-get-hidden-service.sh" >> /etc/sudoers.d/get_root
-
+echo "$reaktor_user ALL=(tor) NOPASSWD: /krebs/bin/tor-get-hidden-service.sh" >> /etc/sudoers.d/reaktor
+echo "$reaktor_user ALL=(root) NOPASSWD: /krebs/bin/refresh-shares.ship" >> /etc/sudoers.d/reaktor
+echo "$reaktor_user ALL=($ncdc_user) NOPASSWD: ALL" >> /etc/sudoers.d/reaktor
+echo
cp /krebs/painload/Reaktor/etc/systemd/system/Reaktor@.service \
/etc/systemd/system
# add bonus features for filehooker
cp -a /krebs/etc/Reaktor /krebs/painload
-
+(printf "%s\n%s\n" "$rootpw" "$rootpw" ) | passwd
for i in multi-user.target \
pacman-init.service \
choose-mirror.service \