From 6fc62407e52697b4c6829ac0f2c82f93d8de83ee Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Tue, 25 Jul 2017 15:08:55 +0200 Subject: [PATCH] [update] Connectivity test at the end of sats-dwc@.service Startin Execution --- clone/utility/sats-dwc@.service | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/clone/utility/sats-dwc@.service b/clone/utility/sats-dwc@.service index 13561ba..f2fb9df 100644 --- a/clone/utility/sats-dwc@.service +++ b/clone/utility/sats-dwc@.service @@ -8,14 +8,20 @@ After=sys-subsystem-net-devices-%i.device network-online.target Type=oneshot RemainAfterExit=yes -ExecStart=/bin/echo "[1] Bringing %i up" +ExecStartPre=-/bin/echo "[0] Killing previous wpa_supplicant instances" +ExecStartPre=-/usr/bin/pkill wpa_supplicant + +ExecStart=-/bin/echo "[1] Bringing %i up" ExecStart=-/usr/sbin/ip link set dev %i up -ExecStart=/bin/echo "[2] Running Dynamic Wireless Configuration" +ExecStart=-/bin/echo "[2] Running Dynamic Wireless Configuration" ExecStart=/bin/bash /etc/wpa_supplicant/%i.dwc -ExecStart=/bin/echo "[3] Running WPA Supplicant" -ExecStart=/sbin/wpa_supplicant -B -Dwext -i%i -c/etc/wpa_supplicant/%i.conf -ExecStart=/bin/echo "[4] Running DHCP client" -ExecStart=/sbin/dhclient %i + +ExecStartPost=-/bin/echo "[3] Running WPA Supplicant" +ExecStartPost=/sbin/wpa_supplicant -B -Dwext -i%i -c/etc/wpa_supplicant/%i.conf +ExecStartPost=-/bin/echo "[4] Running DHCP client" +ExecStartPost=/sbin/dhclient %i +ExecStartPost=-/bin/echo "[5] Checking connectivity" +ExecStartPost=/usr/bin/test -z "`ping xdrm.io -q -c 1 -i 1 2>&1 > /dev/null`" [Install] WantedBy=multi-user.target