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 4c69a5fa5f55bea45145b430c7abac8c7dfd7dd3..0000000000000000000000000000000000000000
--- 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 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
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 0000000000000000000000000000000000000000..3636fbf6b2f03894d18b97e75bf081625851bd72
--- /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 ad7f1e2aac6356789424621b1a84fcc36b1a16de..0000000000000000000000000000000000000000
--- 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