Skip to content

Commit af550ba

Browse files
committed
Change netplan routine check, thanks to @ioannidesalex!
1 parent 1e60d3e commit af550ba

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

bin/v-add-sys-ip

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ if [ -z "$sys_ip_check" ]; then
7676

7777
# Adding Debian/Ubuntu startup script
7878
if [ -e "/etc/debian_version" ]; then
79-
if [ -d "/etc/netplan" ]; then
79+
if dpkg-query -W -f'${Status}' "netplan*" 2>/dev/null | grep -q "ok installed"; then
8080
if [ -f "/etc/netplan/60-hestia.yaml" ]; then
8181
sys_ip=" - $ip/$cidr"
8282
else

bin/v-stop-firewall

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ if [ -d "/etc/sysconfig" ]; then
6363
fi
6464
else
6565
/sbin/iptables-save > /etc/iptables.rules
66-
if [ -d "/etc/netplan" ]; then
66+
if dpkg-query -W -f'${Status}' "netplan*" 2>/dev/null | grep -q "ok installed"; then
6767
preup="/usr/lib/networkd-dispatcher/routable.d/50-ifup-hooks"
6868
if [ ! -e "$preup" ]; then
6969
IFS='%'

bin/v-update-firewall

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ if [ -d "/etc/sysconfig" ]; then
164164
fi
165165
else
166166
/sbin/iptables-save > /etc/iptables.rules
167-
if [ -d "/etc/netplan" ]; then
167+
if dpkg-query -W -f'${Status}' "netplan*" 2>/dev/null | grep -q "ok installed"; then
168168
preup="/usr/lib/networkd-dispatcher/routable.d/50-ifup-hooks"
169169
if [ ! -e "$preup" ]; then
170170
IFS='%'

0 commit comments

Comments
 (0)