From d3b527ec3d29023069ae35cb87798d04538b878f Mon Sep 17 00:00:00 2001 From: Juan RP Date: Sat, 17 Oct 2015 10:55:32 +0200 Subject: installer: get rid of unused systemd checks. --- installer.sh.in | 38 ++++++-------------------------------- 1 file changed, 6 insertions(+), 32 deletions(-) (limited to 'installer.sh.in') diff --git a/installer.sh.in b/installer.sh.in index e1abaa0..dd57f5a 100644 --- a/installer.sh.in +++ b/installer.sh.in @@ -1,6 +1,6 @@ #!/bin/sh #- -# Copyright (c) 2012-2014 Juan Romero Pardines . +# Copyright (c) 2012-2015 Juan Romero Pardines . # 2012 Dave Elusive . # All rights reserved. # @@ -36,7 +36,6 @@ BOOTLOADER_DONE= PARTITIONS_DONE= NETWORK_DONE= FILESYSTEMS_DONE= -SYSTEMD_INIT= TARGETDIR=/mnt/target LOG=/dev/tty8 @@ -59,11 +58,6 @@ if [ -e /sys/firmware/efi/systab ]; then EFI_SYSTEM=1 fi -# Detect if systemd is installed -if [ "$(cat /proc/1/comm)" = "systemd" ]; then - SYSTEMD_INIT=1 -fi - # dialog colors BLACK="\Z0" RED="\Z1" @@ -290,11 +284,7 @@ ${RESET}\n" 18 80 } menu_keymap() { - if [ -n "$SYSTEMD_INIT" ]; then - local _keymaps="$(localectl --no-pager list-keymaps)" - else - local _keymaps="$(find /usr/share/kbd/keymaps/ -type f -iname "*.map.gz" -printf "%f\n" | sed 's|.map.gz||g' | sort)" - fi + local _keymaps="$(find /usr/share/kbd/keymaps/ -type f -iname "*.map.gz" -printf "%f\n" | sed 's|.map.gz||g' | sort)" local _KEYMAPS= for f in ${_keymaps}; do @@ -354,11 +344,7 @@ set_locale() { } menu_timezone() { - if [ -n "$SYSTEMD_INIT" ]; then - local _tzones="$(timedatectl --no-pager list-timezones)" - else - local _tzones="$(cd /usr/share/zoneinfo; find Africa/ America/ Antarctica/ Arctic/ Asia/ Atlantic/ Australia/ Europe/ Indian/ Pacific/ -type f | sort)" - fi + local _tzones="$(cd /usr/share/zoneinfo; find Africa/ America/ Antarctica/ Arctic/ Asia/ Atlantic/ Australia/ Europe/ Indian/ Pacific/ -type f | sort)" local _TIMEZONES= for f in ${_tzones}; do @@ -379,11 +365,7 @@ menu_timezone() { set_timezone() { local TIMEZONE="$(get_option TIMEZONE)" - if [ -z "$SYSTEMD_INIT" ]; then - sed -i -e "s|#TIMEZONE=.*|TIMEZONE=$TIMEZONE|g" $TARGETDIR/etc/rc.conf - else - ln -sf /usr/share/zoneinfo/${TIMEZONE} $TARGETDIR/etc/localtime - fi + sed -i -e "s|#TIMEZONE=.*|TIMEZONE=$TIMEZONE|g" $TARGETDIR/etc/rc.conf } menu_hostname() { @@ -830,11 +812,7 @@ install_packages() { } enable_dhcpd() { - if [ -n "$SYSTEMD_INIT" ]; then - chroot $TARGETDIR systemctl enable dhcpcd.service >$LOG 2>&1 - else - ln -s /etc/sv/dhcpcd $TARGETDIR/etc/runit/runsvdir/default/dhcpcd - fi + ln -sf /etc/sv/dhcpcd $TARGETDIR/etc/runit/runsvdir/default/dhcpcd } menu_install() { @@ -925,11 +903,7 @@ ${BOLD}Do you want to continue?${RESET}" 20 80 || return elif [ "$_type" = "dhcp" ]; then if [ -f /etc/wpa_supplicant/wpa_supplicant-${_dev}.conf ]; then cp /etc/wpa_supplicant/wpa_supplicant-${_dev}.conf $TARGETDIR/etc/wpa_supplicant - if [ -n "$SYSTEMD_INIT" ]; then - chroot $TARGETDIR systemctl enable dhcpcd@${_dev}.service >$LOG 2>&1 - else - ln -s /etc/sv/dhcpcd-${_dev} $TARGETDIR/etc/runit/runsvdir/default/dhcpcd-${_dev} - fi + ln -sf /etc/sv/dhcpcd-${_dev} $TARGETDIR/etc/runit/runsvdir/default/dhcpcd-${_dev} else enable_dhcpd fi -- cgit 1.4.1