diff options
Diffstat (limited to 'elchos/root-image/etc/systemd')
12 files changed, 106 insertions, 0 deletions
diff --git a/elchos/root-image/etc/systemd/scripts/choose-mirror b/elchos/root-image/etc/systemd/scripts/choose-mirror new file mode 100755 index 00000000..0ae08067 --- /dev/null +++ b/elchos/root-image/etc/systemd/scripts/choose-mirror @@ -0,0 +1,26 @@ +#!/bin/bash + +get_cmdline() { + local param + for param in $(< /proc/cmdline); do + case "${param}" in + $1=*) echo "${param##*=}"; + return 0 + ;; + esac + done +} + +mirror=$(get_cmdline mirror) +[[ $mirror = auto ]] && mirror=$(get_cmdline archiso_http_srv) +[[ $mirror ]] || exit 0 + +mv /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.orig +cat >/etc/pacman.d/mirrorlist << EOF +# +# Arch Linux repository mirrorlist +# Generated by archiso +# + +Server = ${mirror%%/}/\$repo/os/\$arch +EOF diff --git a/elchos/root-image/etc/systemd/system/choose-mirror.service b/elchos/root-image/etc/systemd/system/choose-mirror.service new file mode 100644 index 00000000..1e4d771d --- /dev/null +++ b/elchos/root-image/etc/systemd/system/choose-mirror.service @@ -0,0 +1,10 @@ +[Unit] +Description=Choose mirror from the kernel command line +ConditionKernelCommandLine=mirror + +[Service] +Type=oneshot +ExecStart=/etc/systemd/scripts/choose-mirror + +[Install] +WantedBy=multi-user.target diff --git a/elchos/root-image/etc/systemd/system/collectd.service.d/wait.conf b/elchos/root-image/etc/systemd/system/collectd.service.d/wait.conf new file mode 100644 index 00000000..05d8b43c --- /dev/null +++ b/elchos/root-image/etc/systemd/system/collectd.service.d/wait.conf @@ -0,0 +1,2 @@ +[Service] +ExecStartPre=/usr/bin/sleep 20 diff --git a/elchos/root-image/etc/systemd/system/dhcpcd.service.d/force-reboot.conf b/elchos/root-image/etc/systemd/system/dhcpcd.service.d/force-reboot.conf new file mode 100644 index 00000000..5b506341 --- /dev/null +++ b/elchos/root-image/etc/systemd/system/dhcpcd.service.d/force-reboot.conf @@ -0,0 +1,2 @@ +[Service] +StartLimitAction=reboot-force diff --git a/elchos/root-image/etc/systemd/system/elch-hostname.service b/elchos/root-image/etc/systemd/system/elch-hostname.service new file mode 100644 index 00000000..8af94772 --- /dev/null +++ b/elchos/root-image/etc/systemd/system/elch-hostname.service @@ -0,0 +1,11 @@ +[Unit] +Description=change elchOS hostname +Before=network.target nss-lookup.target multi-user.target + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStart=/krebs/bin/set-hostname.sh + +[Install] +WantedBy=multi-user.target diff --git a/elchos/root-image/etc/systemd/system/etc-pacman.d-gnupg.mount b/elchos/root-image/etc/systemd/system/etc-pacman.d-gnupg.mount new file mode 100644 index 00000000..4eab5513 --- /dev/null +++ b/elchos/root-image/etc/systemd/system/etc-pacman.d-gnupg.mount @@ -0,0 +1,8 @@ +[Unit] +Description=Temporary /etc/pacman.d/gnupg directory + +[Mount] +What=tmpfs +Where=/etc/pacman.d/gnupg +Type=tmpfs +Options=mode=0755 diff --git a/elchos/root-image/etc/systemd/system/getty@tty1.service.d/run_krebs_secret.conf b/elchos/root-image/etc/systemd/system/getty@tty1.service.d/run_krebs_secret.conf new file mode 100644 index 00000000..29e5be5f --- /dev/null +++ b/elchos/root-image/etc/systemd/system/getty@tty1.service.d/run_krebs_secret.conf @@ -0,0 +1,3 @@ +[Service] +ExecStart= +ExecStart=-/usr/bin/agetty --autologin reaktor --noclear %I 38400 linux diff --git a/elchos/root-image/etc/systemd/system/hddtemp.service.d/monitor_all_disks.conf b/elchos/root-image/etc/systemd/system/hddtemp.service.d/monitor_all_disks.conf new file mode 100644 index 00000000..e6b8fcda --- /dev/null +++ b/elchos/root-image/etc/systemd/system/hddtemp.service.d/monitor_all_disks.conf @@ -0,0 +1,3 @@ +[Service] +ExecStart= +ExecStart=/bin/bash -c "/usr/bin/hddtemp -dF hddtemp -d /dev/[vsh]d[a-z]" diff --git a/elchos/root-image/etc/systemd/system/ntpdate.service.d/set_hwclock.conf b/elchos/root-image/etc/systemd/system/ntpdate.service.d/set_hwclock.conf new file mode 100644 index 00000000..e57550c8 --- /dev/null +++ b/elchos/root-image/etc/systemd/system/ntpdate.service.d/set_hwclock.conf @@ -0,0 +1,2 @@ +[Service] +ExecStart=/usr/bin/hwclock --systohc --utc -w diff --git a/elchos/root-image/etc/systemd/system/pacman-init.service b/elchos/root-image/etc/systemd/system/pacman-init.service new file mode 100644 index 00000000..23b81445 --- /dev/null +++ b/elchos/root-image/etc/systemd/system/pacman-init.service @@ -0,0 +1,15 @@ +[Unit] +Description=Initializes Pacman keyring +Wants=haveged.service +After=haveged.service +Requires=etc-pacman.d-gnupg.mount +After=etc-pacman.d-gnupg.mount + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStart=/usr/bin/pacman-key --init +ExecStart=/usr/bin/pacman-key --populate archlinux + +[Install] +WantedBy=multi-user.target diff --git a/elchos/root-image/etc/systemd/system/start-ncdc@.service b/elchos/root-image/etc/systemd/system/start-ncdc@.service new file mode 100644 index 00000000..7b5b1b8e --- /dev/null +++ b/elchos/root-image/etc/systemd/system/start-ncdc@.service @@ -0,0 +1,13 @@ +[Unit] +Description=ncdc autoconfig and startup for %i +After=network.target local-fs.target multi-user.target elch-hostname.service + +[Service] +Type=oneshot +RemainAfterExit=yes +#KillMode=none +ExecStart=/usr/bin/tmux new-session -n startup -d "/bin/sh /krebs/bin/start-ncdc.ship" +ExecStop=/usr/bin/sudo -u %i /usr/bin/tmux send-keys -t dcpp:ncdc "/quit" C-m + +[Install] +WantedBy=multi-user.target diff --git a/elchos/root-image/etc/systemd/system/tor-configure-hidden.service b/elchos/root-image/etc/systemd/system/tor-configure-hidden.service new file mode 100644 index 00000000..c9b8f20f --- /dev/null +++ b/elchos/root-image/etc/systemd/system/tor-configure-hidden.service @@ -0,0 +1,11 @@ +[Unit] +Description=Announce Tor Hidden Address +After=network.target nss-lookup.target + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStart=/krebs/bin/tor_configure_hidden_service.ship + +[Install] +WantedBy=multi-user.target |