Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
From 621eeabcd0b30cb819532bdc4a6f9de2c70da4a0 Mon Sep 17 00:00:00 2001
From: Kyle Manna <kyle@kylemanna.com>
Date: Tue, 25 Oct 2016 13:03:16 -0700
Subject: [PATCH 1/2] pkgrel: Fix LICENSE and ARCH arrays
* Thanks to @glitsj16 on AUR
---
.SRCINFO | 4 +++-
PKGBUILD | 6 +++---
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/.SRCINFO b/.SRCINFO
index 46ced95..411b4be 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,9 @@
+# Generated by mksrcinfo v8
+# Tue Oct 25 20:02:52 UTC 2016
pkgbase = digitalocean-synchronize
pkgdesc = DigitalOcean Synchronization (passwords, keys, networks)
pkgver = 2.4
- pkgrel = 2
+ pkgrel = 3
url = https://github.com/gh2o/digitalocean-debian-to-arch
install = digitalocean-synchronize.install
arch = any
diff --git a/PKGBUILD b/PKGBUILD
index f650732..c9b8e1c 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,11 +3,11 @@
pkgname=digitalocean-synchronize
pkgver=2.4
-pkgrel=2
+pkgrel=3
pkgdesc='DigitalOcean Synchronization (passwords, keys, networks)'
url='https://github.com/gh2o/digitalocean-debian-to-arch'
-arch=any
-license=GPL
+arch=('any')
+license=('GPL')
install=digitalocean-synchronize.install
source=('digitalocean-synchronize'
--
2.10.1
From b669be9576e1b170f5a7f9b68f826706e2c0ebdb Mon Sep 17 00:00:00 2001
From: Kyle Manna <kyle@kylemanna.com>
Date: Tue, 25 Oct 2016 13:06:12 -0700
Subject: [PATCH 2/2] pkgrel: Sync with upstream
* Same tagged version.
https://github.com/gh2o/digitalocean-debian-to-arch@7ade66178ac664dedb00fd6a763c4d597ead4480
---
.SRCINFO | 4 ++--
PKGBUILD | 6 +++---
digitalocean-synchronize | 6 ++++++
digitalocean-synchronize.service | 3 ---
4 files changed, 11 insertions(+), 8 deletions(-)
diff --git a/.SRCINFO b/.SRCINFO
index 411b4be..101f3ed 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,9 +1,9 @@
# Generated by mksrcinfo v8
-# Tue Oct 25 20:02:52 UTC 2016
+# Tue Oct 25 20:07:25 UTC 2016
pkgbase = digitalocean-synchronize
pkgdesc = DigitalOcean Synchronization (passwords, keys, networks)
pkgver = 2.4
- pkgrel = 3
+ pkgrel = 4
url = https://github.com/gh2o/digitalocean-debian-to-arch
install = digitalocean-synchronize.install
arch = any
diff --git a/PKGBUILD b/PKGBUILD
index c9b8e1c..705a345 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,7 +3,7 @@
pkgname=digitalocean-synchronize
pkgver=2.4
-pkgrel=3
+pkgrel=4
pkgdesc='DigitalOcean Synchronization (passwords, keys, networks)'
url='https://github.com/gh2o/digitalocean-debian-to-arch'
arch=('any')
@@ -13,8 +13,8 @@ install=digitalocean-synchronize.install
source=('digitalocean-synchronize'
'digitalocean-synchronize.service')
-sha256sums=('2115bcf34d80186103e4399f5a20d410145ee50d316a67bdfe6f43c4b11d2064'
- '5888d367a08604b17528d58aa26050209d8ececf7ed35f90b5e96b31165b6a1c')
+sha256sums=('37261e4f5a79a5308e8e94925a037cc2e3d13fa5a473f6fc9b57bed07c06ed5d'
+ '0e51944270c52293f81ea63cb73af42f93341009ddf714ca3a7afe9d4d15a2a8')
package() {
install -Dm755 digitalocean-synchronize ${pkgdir}/usr/bin/digitalocean-synchronize
diff --git a/digitalocean-synchronize b/digitalocean-synchronize
index 35593fa..bf6827b 100644
--- a/digitalocean-synchronize
+++ b/digitalocean-synchronize
@@ -83,6 +83,12 @@ process_interface() {
fi
log "Added IPv4 address ${address}/${prefix} on ${interface}."
fi
+ if [[ " ${attrs} " =~ " anchor_ipv4/ " ]]; then
+ local address=$(curl -sf ${url}anchor_ipv4/address)
+ local prefix=$(netmask_to_prefix $(curl -sf ${url}anchor_ipv4/netmask))
+ echo "Address=${address}/${prefix}"
+ log "Added Anchor IPv4 address ${address}/${prefix} on ${interface}."
+ fi
if [[ " ${attrs} " =~ " ipv6/ " ]]; then
local address=$(curl -sf ${url}ipv6/address)
local prefix=$(curl -sf ${url}ipv6/cidr)
diff --git a/digitalocean-synchronize.service b/digitalocean-synchronize.service
index 74a0c1c..045b8d3 100644
--- a/digitalocean-synchronize.service
+++ b/digitalocean-synchronize.service
@@ -7,6 +7,3 @@ After=systemd-udevd.service
[Service]
Type=oneshot
ExecStart=/usr/sbin/digitalocean-synchronize
-
-[Install]
-WantedBy=multi-user.target
--
2.10.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.