Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

lnet: Fixed an issue with systemd gateway handling

  • Loading branch information...
commit f753c11262d22028afc2ba8cb4192af27a970e03 1 parent 436ceff
@Ratler authored
Showing with 4 additions and 4 deletions.
  1. +4 −4 lnet/lnet
View
8 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
}
Please sign in to comment.
Something went wrong with that request. Please try again.