Skip to content

Commit

Permalink
lnet: Fixed an issue with systemd gateway handling
Browse files Browse the repository at this point in the history
  • Loading branch information
Ratler committed Jul 30, 2012
1 parent 436ceff commit f753c11
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lnet/lnet
Expand Up @@ -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]
Expand Down Expand Up @@ -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
}
Expand Down

0 comments on commit f753c11

Please sign in to comment.