From 971dec8d27ff28b68e1fe26c07d7daa8eb660bb4 Mon Sep 17 00:00:00 2001
From: Matthias Schiffer <mschiffer@universe-factory.net>
Date: Sun, 20 Jul 2014 04:04:27 +0200
Subject: [PATCH] gluon-core: remove now unused dnsmasq.d support

---
 package/gluon-core/files/etc/init.d/gluon-core            | 8 --------
 package/gluon-core/files/lib/gluon/dnsmasq.d/.keep        | 0
 .../files/lib/gluon/upgrade/core/invariant/010-dnsmasq    | 5 +++++
 .../files/lib/gluon/upgrade/core/invariant/010-dnsmasq.d  | 3 ---
 4 files changed, 5 insertions(+), 11 deletions(-)
 delete mode 100755 package/gluon-core/files/etc/init.d/gluon-core
 delete mode 100644 package/gluon-core/files/lib/gluon/dnsmasq.d/.keep
 create mode 100755 package/gluon-core/files/lib/gluon/upgrade/core/invariant/010-dnsmasq
 delete mode 100755 package/gluon-core/files/lib/gluon/upgrade/core/invariant/010-dnsmasq.d

diff --git a/package/gluon-core/files/etc/init.d/gluon-core b/package/gluon-core/files/etc/init.d/gluon-core
deleted file mode 100755
index 4c69a5fa5..000000000
--- a/package/gluon-core/files/etc/init.d/gluon-core
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh /etc/rc.common
-
-START=11
-
-
-start() {
-	mkdir -p /var/gluon/dnsmasq.d
-}
diff --git a/package/gluon-core/files/lib/gluon/dnsmasq.d/.keep b/package/gluon-core/files/lib/gluon/dnsmasq.d/.keep
deleted file mode 100644
index e69de29bb..000000000
diff --git a/package/gluon-core/files/lib/gluon/upgrade/core/invariant/010-dnsmasq b/package/gluon-core/files/lib/gluon/upgrade/core/invariant/010-dnsmasq
new file mode 100755
index 000000000..3636fbf6b
--- /dev/null
+++ b/package/gluon-core/files/lib/gluon/upgrade/core/invariant/010-dnsmasq
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+if [ -e /etc/dnsmasq.conf ]; then
+	sed -i -e '/^conf-dir=\/lib\/gluon\/dnsmasq\.d$/d' -e '/^conf-dir=\/var\/gluon\/dnsmasq\.d$/d' /etc/dnsmasq.conf
+fi
diff --git a/package/gluon-core/files/lib/gluon/upgrade/core/invariant/010-dnsmasq.d b/package/gluon-core/files/lib/gluon/upgrade/core/invariant/010-dnsmasq.d
deleted file mode 100755
index ad7f1e2aa..000000000
--- a/package/gluon-core/files/lib/gluon/upgrade/core/invariant/010-dnsmasq.d
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-
-echo -e 'conf-dir=/lib/gluon/dnsmasq.d\nconf-dir=/var/gluon/dnsmasq.d' > /etc/dnsmasq.conf
-- 
GitLab