Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
D
Dnsmasq
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
Dnsmasq
Commits
2cd9a0de
Commit
2cd9a0de
authored
Jun 11, 2012
by
Simon Kelley
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Debian systemd startup fixes for resolvconf integration.
parent
c514ab99
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
45 additions
and
15 deletions
+45
-15
debian/changelog
debian/changelog
+8
-1
debian/init
debian/init
+21
-0
debian/systemd.service
debian/systemd.service
+16
-14
No files found.
debian/changelog
View file @
2cd9a0de
...
@@ -2,7 +2,14 @@ dnsmasq (2.63-1) unstable; urgency=low
...
@@ -2,7 +2,14 @@ dnsmasq (2.63-1) unstable; urgency=low
* New upstream.
* New upstream.
-- Simon Kelley <simon@thekelleys.org.uk> Thu, 7 Jun 2012 15:31:35 +0000
-- Simon Kelley <simon@thekelleys.org.uk> Mon, 11 Jun 2012 21:55:35 +0000
dnsmasq (2.62-3) unstable; urgency=low
* Do resolvconf and /etc/default startup logic when
starting with systemd. (closes: #675854)
-- Simon Kelley <simon@thekelleys.org.uk> Mon, 11 Jun 2012 21:50:11 +0000
dnsmasq (2.62-2) unstable; urgency=low
dnsmasq (2.62-2) unstable; urgency=low
...
...
debian/init
View file @
2cd9a0de
...
@@ -259,6 +259,27 @@ case "$1" in
...
@@ -259,6 +259,27 @@ case "$1" in
dump-stats
)
dump-stats
)
kill
-s
USR1
`
cat
/var/run/dnsmasq/
$NAME
.pid
`
kill
-s
USR1
`
cat
/var/run/dnsmasq/
$NAME
.pid
`
;;
;;
systemd-start-resolvconf
)
start_resolvconf
;;
systemd-stop-resolvconf
)
stop_resolvconf
;;
systemd-exec
)
# --pid-file without argument disables writing a PIDfile, we don't need one with sytemd.
# Enable DBus by default because we use DBus activation with systemd.
exec
$DAEMON
--keep-in-foreground
--pid-file
--enable-dbus
\
${
MAILHOSTNAME
:+
-m
$MAILHOSTNAME
}
\
${
MAILTARGET
:+
-t
$MAILTARGET
}
\
${
DNSMASQ_USER
:+
-u
$DNSMASQ_USER
}
\
${
DNSMASQ_INTERFACES
:+
$DNSMASQ_INTERFACES
}
\
${
DHCP_LEASE
:+
-l
$DHCP_LEASE
}
\
${
DOMAIN_SUFFIX
:+
-s
$DOMAIN_SUFFIX
}
\
${
RESOLV_CONF
:+
-r
$RESOLV_CONF
}
\
${
CACHESIZE
:+
-c
$CACHESIZE
}
\
${
CONFIG_DIR
:+
-7
$CONFIG_DIR
}
\
${
DNSMASQ_OPTS
:+
$DNSMASQ_OPTS
}
;;
*
)
*
)
echo
"Usage: /etc/init.d/
$NAME
{start|stop|restart|force-reload|dump-stats|status}"
>
&2
echo
"Usage: /etc/init.d/
$NAME
{start|stop|restart|force-reload|dump-stats|status}"
>
&2
exit
3
exit
3
...
...
debian/systemd.service
View file @
2cd9a0de
...
@@ -8,22 +8,24 @@ BusName=uk.org.thekelleys.dnsmasq
...
@@ -8,22 +8,24 @@ BusName=uk.org.thekelleys.dnsmasq
# Test the config file and refuse starting if it is not valid.
# Test the config file and refuse starting if it is not valid.
ExecStartPre=/usr/sbin/dnsmasq --test
ExecStartPre=/usr/sbin/dnsmasq --test
# Enable DBus by default because we use DBus activation.
# We run dnsmasq via the /etc/init.d/dnsmasq script which acts as a
# wrapper picking up extra configuration files and then execs dnsmasq
# itself, when called with the "systemd-exec" function.
#
#
#
Drop privileges and become the 'dnsmasq' user. It is recommended by dnsmasq
#
It also adds the command-line flags
#
upstream to run dnsmasq as an isolated user that does not run any other
#
--keep-in-foreground --pid-file --enable-dbus
#
processes, owns no files and has no shell. The default 'nobody' user has a
#
to disable writing a pid-file (not needed with systemd) and
#
shell and might be used for other processes
.
#
enable DBus by default because we use DBus activation
.
#
#
# Debian-specific: add /etc/dnsmasq.d to config search path (with the exception
ExecStart=/etc/init.d/dnsmasq systemd-exec
# of .dpkg-*). Packages such as libvirt leave config files there.
#
#
The systemd-*-resolvconf functions configure (and deconfigure)
#
--pid-file without argument disables writing a PIDfile, we don't need one.
#
resolvconf to work with the dnsmasq DNS server. They're called liek
ExecStart=/usr/sbin/dnsmasq -k \
# this to get correct error handling (ie don't start-resolvconf if the
--enable-dbus \
# dnsmasq daemon fails to start.
--user=dnsmasq \
ExecStartPost=/etc/init.d/dnsmasq systemd-start-resolvconf
-7 /etc/dnsmasq.d,.dpkg-dist,.dpkg-old,.dpkg-new \
ExecStop=/etc/init.d/dnsmasq systemd-stop-resolvconf
--pid-file
ExecReload=/bin/kill -HUP $MAINPID
ExecReload=/bin/kill -HUP $MAINPID
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment