From f753c11262d22028afc2ba8cb4192af27a970e03 Mon Sep 17 00:00:00 2001 From: Stefan Wold Date: Mon, 30 Jul 2012 21:50:48 +0200 Subject: [PATCH] lnet: Fixed an issue with systemd gateway handling --- lnet/lnet | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lnet/lnet b/lnet/lnet index 8c0ed63..af6fb31 100755 --- a/lnet/lnet +++ b/lnet/lnet @@ -100,7 +100,7 @@ After=network.target [Service] Type=oneshot RemainAfterExit=yes -ExecStart=/usr/sbin/ip route add default via \$(cat /etc/config.d/gateway) +ExecStart=/usr/sbin/ip route add default via $(/usr/bin/cat /etc/config.d/gateway) ExecStop=/usr/sbin/ip route del default [Install] @@ -240,12 +240,12 @@ function gateway_config() { GATEWAY=`inputbox "$GATEWAY_PROMPT" "$GATEWAY"` echo "$GATEWAY" > /etc/config.d/gateway if [ -n $SYSTEMDUNITDIR ]; then - if [ -n $GATEWAY ]; then + if [ -n "$GATEWAY" ]; then systemd_gw_template systemctl daemon-reload &> /dev/null - ln -s /etc/systemd/system/lnet-default-gateway.service /etc/systemd/system/multi-user.target.wants/lnet-default-gateway.service + systemctl enable lnet-default-gateway.service else - rm /etc/systemd/system/multi-user.target.wants/lnet-default-gateway.service + systemctl disable lnet-default-gateway.service fi fi }