diff options
Diffstat (limited to 'configs/releng/root-image')
-rw-r--r-- | configs/releng/root-image/etc/archiso/functions | 20 | ||||
-rw-r--r-- | configs/releng/root-image/etc/conf.d/dhcpcd | 6 | ||||
-rw-r--r-- | configs/releng/root-image/etc/fstab | 0 | ||||
-rw-r--r-- | configs/releng/root-image/etc/inittab | 48 | ||||
-rw-r--r-- | configs/releng/root-image/etc/rc.conf | 23 | ||||
-rw-r--r-- | configs/releng/root-image/etc/rc.d/functions.d/automated_script | 23 | ||||
-rw-r--r-- | configs/releng/root-image/etc/rc.d/functions.d/setup_special_console | 25 | ||||
-rwxr-xr-x | configs/releng/root-image/etc/rc.d/pacman-init | 34 | ||||
-rw-r--r-- | configs/releng/root-image/etc/systemd/system/dhcpcd.service | 13 | ||||
-rw-r--r-- | configs/releng/root-image/etc/systemd/system/etc-pacman.d-gnupg.mount | 8 | ||||
-rw-r--r-- | configs/releng/root-image/etc/systemd/system/pacman-init.service | 15 | ||||
-rw-r--r-- | configs/releng/root-image/etc/timezone | 1 | ||||
-rw-r--r-- | configs/releng/root-image/etc/vconsole.conf | 2 | ||||
-rwxr-xr-x | configs/releng/root-image/root/.automated_script.sh | 34 | ||||
-rw-r--r-- | configs/releng/root-image/root/.zlogin | 1 |
15 files changed, 71 insertions, 182 deletions
diff --git a/configs/releng/root-image/etc/archiso/functions b/configs/releng/root-image/etc/archiso/functions deleted file mode 100644 index 9fffdcb..0000000 --- a/configs/releng/root-image/etc/archiso/functions +++ /dev/null @@ -1,20 +0,0 @@ -# vim: set ft=sh: - -# kernel_cmdline <param> <default> -# Looks for a parameter on the kernel's boot-time command line. -# -# returns: 0 if param was found. Also prints its value if it was a K=V param. -# 1 if it was not. Also prints value passed as <default> -# -kernel_cmdline () -{ - for param in $(/bin/cat /proc/cmdline); do - case "${param}" in - $1=*) echo "${param##*=}"; return 0 ;; - $1) return 0 ;; - *) continue ;; - esac - done - [ -n "${2}" ] && echo "${2}" - return 1 -} diff --git a/configs/releng/root-image/etc/conf.d/dhcpcd b/configs/releng/root-image/etc/conf.d/dhcpcd deleted file mode 100644 index 76b56ff..0000000 --- a/configs/releng/root-image/etc/conf.d/dhcpcd +++ /dev/null @@ -1,6 +0,0 @@ -# -# Arguments to be passed to the DHCP client daemon -# - -DHCPCD_ARGS="-qb" - diff --git a/configs/releng/root-image/etc/fstab b/configs/releng/root-image/etc/fstab new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/configs/releng/root-image/etc/fstab diff --git a/configs/releng/root-image/etc/inittab b/configs/releng/root-image/etc/inittab deleted file mode 100644 index e3fe2c8..0000000 --- a/configs/releng/root-image/etc/inittab +++ /dev/null @@ -1,48 +0,0 @@ -# -# /etc/inittab -# - -# Runlevels: -# 0 Halt -# 1(S) Single-user -# 2 Not used -# 3 Multi-user -# 4 Not used -# 5 X11 -# 6 Reboot - -## Only one of the following two lines can be uncommented! -# Boot to console -id:3:initdefault: -# Boot to X11 -#id:5:initdefault: - -rc::sysinit:/etc/rc.sysinit -rs:S1:wait:/etc/rc.single -rm:2345:wait:/etc/rc.multi -rh:06:wait:/etc/rc.shutdown -su:S:wait:/sbin/sulogin -p - -# -8 options fixes umlauts problem on login -c1:2345:respawn:/sbin/agetty -8 -s -a root 38400 tty1 linux -c2:2345:respawn:/sbin/agetty -8 -s 38400 tty2 linux -c3:2345:respawn:/sbin/agetty -8 -s 38400 tty3 linux -c4:2345:respawn:/sbin/agetty -8 -s 38400 tty4 linux -c5:2345:respawn:/sbin/agetty -8 -s 38400 tty5 linux -c6:2345:respawn:/sbin/agetty -8 -s 38400 tty6 linux - -# Serial Virtual Console for KVM and others VMs -#s0:2345:respawn:/sbin/agetty -8 -s 9600 ttyS0 linux - -# Hypervisor Virtual Console for Xen and KVM -#h0:2345:respawn:/sbin/agetty -8 -s 38400 hvc0 linux - -ca::ctrlaltdel:/sbin/shutdown -t3 -r now - -# Example lines for starting a login manager -x:5:respawn:/usr/bin/xdm -nodaemon -#x:5:respawn:/usr/sbin/gdm -nodaemon -#x:5:respawn:/usr/bin/kdm -nodaemon -#x:5:respawn:/usr/bin/slim >/dev/null 2>&1 - -# End of file diff --git a/configs/releng/root-image/etc/rc.conf b/configs/releng/root-image/etc/rc.conf deleted file mode 100644 index 679b804..0000000 --- a/configs/releng/root-image/etc/rc.conf +++ /dev/null @@ -1,23 +0,0 @@ -. /etc/archiso/functions -# -# /etc/rc.conf - configuration file for initscripts -# -# Most of rc.conf has been replaced by various other configuration -# files. See parabola(7) for details. -# -# For more details on rc.conf see rc.conf(5). -# - -DAEMONS=(syslog-ng network haveged pacman-init) - -# Storage -# -# USEDMRAID="no" -# USELVM="no" - -# Network -# -# interface= -# address= -# netmask= -# gateway= diff --git a/configs/releng/root-image/etc/rc.d/functions.d/automated_script b/configs/releng/root-image/etc/rc.d/functions.d/automated_script deleted file mode 100644 index f3e9018..0000000 --- a/configs/releng/root-image/etc/rc.d/functions.d/automated_script +++ /dev/null @@ -1,23 +0,0 @@ -automated_script () -{ - script="$(kernel_cmdline script)" - if [[ -n "${script}" ]]; then - stat_busy "Configuring $script" - if [[ "${script}" =~ ^http:// || "${script}" =~ ^ftp:// ]]; then - wget "${script}" -q -O /tmp/startup_script >/dev/null - rt=$? - else - cp "${script}" /tmp/startup_script - rt=$? - fi - if [ ${rt} -eq 0 ]; then - chmod +x /tmp/startup_script - echo -e '\nif [ $(tty) = "/dev/tty1" ]; then\n /tmp/startup_script\nfi\n' >> /root/.zprofile - stat_done - else - stat_fail - fi - fi -} - -add_hook multi_end automated_script diff --git a/configs/releng/root-image/etc/rc.d/functions.d/setup_special_console b/configs/releng/root-image/etc/rc.d/functions.d/setup_special_console deleted file mode 100644 index 7badfe3..0000000 --- a/configs/releng/root-image/etc/rc.d/functions.d/setup_special_console +++ /dev/null @@ -1,25 +0,0 @@ -# If an alternate console was specified on the kernel command line, -# start agetty on it too. -setup_special_console() -{ - local cmdline_console - if cmdline_console=$(kernel_cmdline console); then - stat_busy "Starting agetty on console: ${cmdline_console}" - local port options baud rts - port=${cmdline_console%%,*} - options=${cmdline_console#${port}} - options=${options#,} - baud=${options%%[neo]*} - [[ ${options} == *r ]] && rts="-h" - if ! grep -q "^${port}" /etc/securetty; then - echo ${port} >> /etc/securetty - fi - if ! grep -q "^z0:" /etc/inittab; then - echo "z0:2345:respawn:/sbin/agetty -8 -s ${rts} ${baud:-9600} ${port} linux" >> /etc/inittab - fi - /sbin/telinit q - stat_done - fi -} - -add_hook sysinit_end setup_special_console diff --git a/configs/releng/root-image/etc/rc.d/pacman-init b/configs/releng/root-image/etc/rc.d/pacman-init deleted file mode 100755 index 596fe30..0000000 --- a/configs/releng/root-image/etc/rc.d/pacman-init +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/bash - -. /etc/rc.conf -. /etc/rc.d/functions - -case "$1" in - start) - stat_busy "Initializing pacman keyring" - if { pacman-key --init && pacman-key --populate archlinux && pacman-key --populate parabola; } &>/dev/null; then - add_daemon pacman-init - stat_done - else - stat_fail - exit 1 - fi - ;; - - stop) - stat_busy "Removing pacman keyring" - rm -rf /etc/pacman.d/gnupg - rm_daemon pacman-init - stat_done - ;; - - restart) - $0 stop - $0 start - ;; - - *) - echo "usage: $0 {start|stop|restart}" -esac - -exit 0 diff --git a/configs/releng/root-image/etc/systemd/system/dhcpcd.service b/configs/releng/root-image/etc/systemd/system/dhcpcd.service new file mode 100644 index 0000000..dd030d5 --- /dev/null +++ b/configs/releng/root-image/etc/systemd/system/dhcpcd.service @@ -0,0 +1,13 @@ +[Unit] +Description=dhcpcd on all interfaces +Wants=network.target +Before=network.target + +[Service] +Type=forking +PIDFile=/run/dhcpcd.pid +ExecStart=/sbin/dhcpcd -A -b -q +ExecStop=/sbin/dhcpcd -k + +[Install] +WantedBy=multi-user.target diff --git a/configs/releng/root-image/etc/systemd/system/etc-pacman.d-gnupg.mount b/configs/releng/root-image/etc/systemd/system/etc-pacman.d-gnupg.mount new file mode 100644 index 0000000..4eab551 --- /dev/null +++ b/configs/releng/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/configs/releng/root-image/etc/systemd/system/pacman-init.service b/configs/releng/root-image/etc/systemd/system/pacman-init.service new file mode 100644 index 0000000..23b8144 --- /dev/null +++ b/configs/releng/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/configs/releng/root-image/etc/timezone b/configs/releng/root-image/etc/timezone deleted file mode 100644 index e2e7775..0000000 --- a/configs/releng/root-image/etc/timezone +++ /dev/null @@ -1 +0,0 @@ -UTC diff --git a/configs/releng/root-image/etc/vconsole.conf b/configs/releng/root-image/etc/vconsole.conf deleted file mode 100644 index c58bf7e..0000000 --- a/configs/releng/root-image/etc/vconsole.conf +++ /dev/null @@ -1,2 +0,0 @@ -KEYMAP=us -FONT= diff --git a/configs/releng/root-image/root/.automated_script.sh b/configs/releng/root-image/root/.automated_script.sh new file mode 100755 index 0000000..fb106da --- /dev/null +++ b/configs/releng/root-image/root/.automated_script.sh @@ -0,0 +1,34 @@ +#!/bin/bash + +script_cmdline () +{ + local param + for param in $(< /proc/cmdline); do + case "${param}" in + script=*) echo "${param##*=}" ; return 0 ;; + esac + done +} + +automated_script () +{ + local script rt + script="$(script_cmdline)" + if [[ -n "${script}" && ! -x /tmp/startup_script ]]; then + if [[ "${script}" =~ ^http:// || "${script}" =~ ^ftp:// ]]; then + wget "${script}" --retry-connrefused -q -O /tmp/startup_script >/dev/null + rt=$? + else + cp "${script}" /tmp/startup_script + rt=$? + fi + if [[ ${rt} -eq 0 ]]; then + chmod +x /tmp/startup_script + /tmp/startup_script + fi + fi +} + +if [[ $(tty) == "/dev/tty1" ]]; then + automated_script +fi diff --git a/configs/releng/root-image/root/.zlogin b/configs/releng/root-image/root/.zlogin new file mode 100644 index 0000000..f598e43 --- /dev/null +++ b/configs/releng/root-image/root/.zlogin @@ -0,0 +1 @@ +~/.automated_script.sh |