From cb519db818cf602b87e3e3a10c510b593b397d29 Mon Sep 17 00:00:00 2001 From: Fabio Erculiani Date: Thu, 6 Jun 2013 15:19:54 +0200 Subject: [PATCH] [scripts] inner_chroot_script: fix sd_enable with .target services --- scripts/inner_chroot_script.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/scripts/inner_chroot_script.sh b/scripts/inner_chroot_script.sh index e98cfce..f1b3e92 100755 --- a/scripts/inner_chroot_script.sh +++ b/scripts/inner_chroot_script.sh @@ -4,13 +4,17 @@ . /etc/profile sd_enable() { + local srv="${1}" + local ext=".${2:-service}" [[ -x /usr/bin/systemctl ]] && \ - systemctl --no-reload enable -f "${1}.service" + systemctl --no-reload enable -f "${srv}${ext}" } sd_disable() { + local srv="${1}" + local ext=".${2:-service}" [[ -x /usr/bin/systemctl ]] && \ - systemctl --no-reload disable -f "${1}.service" + systemctl --no-reload disable -f "${srv}${ext}" } # create /proc if it doesn't exist @@ -46,7 +50,7 @@ echo FONT=LatArCyrHeb-16 > /etc/vconsole.conf # since this comes without X, set the default target to multi-user.target # instead of graphical.target -sd_enable multi-user +sd_enable multi-user target # remove SSH keys rm -rf /etc/ssh/*_key*