From 3b14f6e0789491ea17923c94b81f077cae13b214 Mon Sep 17 00:00:00 2001 From: Vinicius Zavam Date: Wed, 1 Nov 2017 20:18:47 +0000 Subject: [PATCH] added tupport to 10.4-RELEASE; if there's no private interface, now it says 'DEACTIVATED'; fancy. --- README.md | 2 +- bootstrap.sh | 2 +- etc/rc.d/digitalocean | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 36cdd36..2eb4a6b 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ DigitalOcean's Unofficial/Experimental rc Script -1. Create a FreeBSD Droplet (10.3, 11.0, or 11.1; UFS or ZFS. It doesn't matter); +1. Create a FreeBSD Droplet (10.3, 10.4, 11.0, or 11.1; UFS or ZFS. It doesn't matter); 2. Run the steps below in your brand new FreeBSD Droplet; ``` diff --git a/bootstrap.sh b/bootstrap.sh index b6380ae..97948f9 100644 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -26,7 +26,7 @@ if ((${GREP} zfs /boot/loader.conf*) && (${GREP} zroot /boot/loader.conf*)); the zfs destroy -vr zroot/usr/src fi -if ((/bin/freebsd-version | ${GREP} 10.3)); then +if ((/bin/freebsd-version | ${GREP} ^10)); then patch -p0 /etc/defaults/rc.conf < ${BASE_DIR}/etc/defaults/rc.conf_patch fi diff --git a/etc/rc.d/digitalocean b/etc/rc.d/digitalocean index 705887d..16328a1 100644 --- a/etc/rc.d/digitalocean +++ b/etc/rc.d/digitalocean @@ -115,6 +115,8 @@ digitalocean_info() DROPLET_PRIVATE_IP4_ADDR=$(${fetch}/interfaces/private/0/ipv4/address) DROPLET_PRIVATE_IP4_MASK=$(${fetch}/interfaces/private/0/ipv4/netmask) echo " inet" ${DROPLET_PRIVATE_IP4_ADDR} "netmask" ${DROPLET_PRIVATE_IP4_MASK} + else + echo " DEACTIVATED" fi echo "----------------------------------------------------------------------" echo "Droplet's Gateways"