summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorIlya Lipnitskiy2015-10-12 18:21:03 -0700
committerIlya Lipnitskiy2015-10-12 18:52:17 -0700
commit76f148506a0ed8528d48b8482436fa5064a9c7ab (patch)
treea6e4e198f03b53a665c553257e8d7d13434cd9a6
downloadaur-76f148506a0ed8528d48b8482436fa5064a9c7ab.tar.gz
Initial commit
-rw-r--r--.SRCINFO17
-rw-r--r--10-ntpdconf14
-rw-r--r--LICENSE19
-rw-r--r--PKGBUILD18
4 files changed, 68 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..5bae4e99b64
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,17 @@
+pkgbase = networkmanager-dispatcher-ntpdconf
+ pkgdesc = Dispatcher Script for generating ntpd.conf
+ pkgver = 1.0
+ pkgrel = 1
+ url = http://www.gnome.org/projects/NetworkManager/
+ arch = any
+ license = MIT
+ depends = networkmanager
+ optdepends = ntp
+ optdepends = openntpd
+ source = 10-ntpdconf
+ source = LICENSE
+ md5sums = b1538967754a2a31e1155710bf00d8cf
+ md5sums = 69120da70cc3f06557abc2d5575eee41
+
+pkgname = networkmanager-dispatcher-ntpdconf
+
diff --git a/10-ntpdconf b/10-ntpdconf
new file mode 100644
index 00000000000..4baadc46089
--- /dev/null
+++ b/10-ntpdconf
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+# DHCPv4
+if [ -n "$DHCP4_NTP_SERVERS" ]; then
+ case "$2" in
+ dhcp4-change)
+ ntpd_conf_new=/etc/ntpd.conf
+ echo "#Generated by NetworkManager dispatcher" > $ntpd_conf_new
+ for ntp_server in $DHCP4_NTP_SERVERS; do
+ echo "server $ntp_server" >> $ntpd_conf_new
+ done
+ ;;
+ esac
+fi
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 00000000000..9493751fe37
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2015 Ilya Lipnitskiy
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..f2328c526db
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,18 @@
+# Maintainer: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
+pkgname=networkmanager-dispatcher-ntpdconf
+pkgver=1.0
+pkgrel=1
+pkgdesc="Dispatcher Script for generating ntpd.conf"
+arch=(any)
+license=('MIT')
+url="http://www.gnome.org/projects/NetworkManager/"
+depends=('networkmanager')
+optdepends=('ntp' 'openntpd')
+source=("10-ntpdconf" "LICENSE")
+md5sums=('b1538967754a2a31e1155710bf00d8cf'
+ '69120da70cc3f06557abc2d5575eee41')
+
+package() {
+ install -Dm755 $srcdir/10-ntpdconf $pkgdir/etc/NetworkManager/dispatcher.d/10-ntpdconf
+ install -Dm644 $srcdir/LICENSE $pkgdir/usr/share/licenses/$pkgname/LICENSE
+}