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
47901154
Commit
47901154
authored
Sep 29, 2015
by
Simon Kelley
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use /run/dnsmasq instead of /var/run/dnsmasq in Debian package.
parent
27b78d99
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
28 additions
and
27 deletions
+28
-27
debian/changelog
debian/changelog
+2
-0
debian/dnsmasq-base.postinst
debian/dnsmasq-base.postinst
+3
-3
debian/dnsmasq-base.postrm
debian/dnsmasq-base.postrm
+1
-1
debian/init
debian/init
+19
-19
debian/postinst
debian/postinst
+1
-1
debian/resolvconf
debian/resolvconf
+1
-1
debian/rules
debian/rules
+0
-1
debian/systemd.service
debian/systemd.service
+1
-1
No files found.
debian/changelog
View file @
47901154
dnsmasq (2.76-1) unstable; urgency=low
* New upstream. (closes: #798586)
* Use /run/dnsmasq directly, rather than relying on link from /var/run
to avoid problems before /var is mounted. (closes: #800351)
-- Simon Kelley <simon@thekelleys.org.uk> Thur, 10 Sep 2015 23:07:21 +0000
...
...
debian/dnsmasq-base.postinst
View file @
47901154
...
...
@@ -17,8 +17,8 @@ if [ "$1" = "configure" ]; then
# dnsmasq-base, but it's much easier to create it here so that
# we don't have synchronisation issues with the creation of the
# dnsmasq user.
if
[
!
-d
/
var/
run/dnsmasq
]
;
then
mkdir
/
var/
run/dnsmasq
chown
dnsmasq:nogroup /
var/
run/dnsmasq
if
[
!
-d
/run/dnsmasq
]
;
then
mkdir
/run/dnsmasq
chown
dnsmasq:nogroup /run/dnsmasq
fi
fi
debian/dnsmasq-base.postrm
View file @
47901154
...
...
@@ -7,5 +7,5 @@ if [ purge = "$1" ]; then
else
echo
>
&2
"not removing dnsmasq system account because deluser command was not found"
fi
rm
-rf
/
var/
run/dnsmasq
rm
-rf
/run/dnsmasq
fi
debian/init
View file @
47901154
...
...
@@ -81,7 +81,7 @@ if [ ! "$RESOLV_CONF" ] &&
[
"
$IGNORE_RESOLVCONF
"
!=
"yes"
]
&&
[
-x
/sbin/resolvconf
]
then
RESOLV_CONF
=
/
var/
run/dnsmasq/resolv.conf
RESOLV_CONF
=
/run/dnsmasq/resolv.conf
fi
for
INTERFACE
in
$DNSMASQ_INTERFACE
;
do
...
...
@@ -121,16 +121,16 @@ start()
# 1 if daemon was already running
# 2 if daemon could not be started
# /
var/
run may be volatile, so we need to ensure that
# /
var/
run/dnsmasq exists here as well as in postinst
if
[
!
-d
/
var/
run/dnsmasq
]
;
then
mkdir
/
var/
run/dnsmasq
||
return
2
chown
dnsmasq:nogroup /
var/
run/dnsmasq
||
return
2
# /run may be volatile, so we need to ensure that
# /run/dnsmasq exists here as well as in postinst
if
[
!
-d
/run/dnsmasq
]
;
then
mkdir
/run/dnsmasq
||
return
2
chown
dnsmasq:nogroup /run/dnsmasq
||
return
2
fi
start-stop-daemon
--start
--quiet
--pidfile
/
var/
run/dnsmasq/
$NAME
.pid
--exec
$DAEMON
--test
>
/dev/null
||
return
1
start-stop-daemon
--start
--quiet
--pidfile
/
var/
run/dnsmasq/
$NAME
.pid
--exec
$DAEMON
--
\
-x
/
var/
run/dnsmasq/
$NAME
.pid
\
start-stop-daemon
--start
--quiet
--pidfile
/run/dnsmasq/
$NAME
.pid
--exec
$DAEMON
--test
>
/dev/null
||
return
1
start-stop-daemon
--start
--quiet
--pidfile
/run/dnsmasq/
$NAME
.pid
--exec
$DAEMON
--
\
-x
/run/dnsmasq/
$NAME
.pid
\
${
MAILHOSTNAME
:+
-m
$MAILHOSTNAME
}
\
${
MAILTARGET
:+
-t
$MAILTARGET
}
\
${
DNSMASQ_USER
:+
-u
$DNSMASQ_USER
}
\
...
...
@@ -167,7 +167,7 @@ stop()
# 1 if daemon was already stopped
# 2 if daemon could not be stopped
# other if a failure occurred
start-stop-daemon
--stop
--quiet
--retry
=
TERM/30/KILL/5
--pidfile
/
var/
run/dnsmasq/
$NAME
.pid
--name
$NAME
start-stop-daemon
--stop
--quiet
--retry
=
TERM/30/KILL/5
--pidfile
/run/dnsmasq/
$NAME
.pid
--name
$NAME
}
stop_resolvconf
()
...
...
@@ -185,9 +185,9 @@ status()
# 1 if daemon is dead and pid file exists
# 3 if daemon is not running
# 4 if daemon status is unknown
start-stop-daemon
--start
--quiet
--pidfile
/
var/
run/dnsmasq/
$NAME
.pid
--exec
$DAEMON
--test
>
/dev/null
start-stop-daemon
--start
--quiet
--pidfile
/run/dnsmasq/
$NAME
.pid
--exec
$DAEMON
--test
>
/dev/null
case
"
$?
"
in
0
)
[
-e
"/
var/
run/dnsmasq/
$NAME
.pid"
]
&&
return
1
;
return
3
;;
0
)
[
-e
"/run/dnsmasq/
$NAME
.pid"
]
&&
return
1
;
return
3
;;
1
)
return
0
;;
*
)
return
4
;;
esac
...
...
@@ -278,7 +278,7 @@ case "$1" in
esac
;;
dump-stats
)
kill
-s
USR1
`
cat
/
var/
run/dnsmasq/
$NAME
.pid
`
kill
-s
USR1
`
cat
/run/dnsmasq/
$NAME
.pid
`
;;
systemd-start-resolvconf
)
start_resolvconf
...
...
@@ -287,13 +287,13 @@ case "$1" in
stop_resolvconf
;;
systemd-exec
)
# /
var/
run may be volatile, so we need to ensure that
# /
var/
run/dnsmasq exists here as well as in postinst
if
[
!
-d
/
var/
run/dnsmasq
]
;
then
mkdir
/
var/
run/dnsmasq
||
return
2
chown
dnsmasq:nogroup /
var/
run/dnsmasq
||
return
2
# /run may be volatile, so we need to ensure that
# /run/dnsmasq exists here as well as in postinst
if
[
!
-d
/run/dnsmasq
]
;
then
mkdir
/run/dnsmasq
||
return
2
chown
dnsmasq:nogroup /run/dnsmasq
||
return
2
fi
exec
$DAEMON
-x
/
var/
run/dnsmasq/
$NAME
.pid
\
exec
$DAEMON
-x
/run/dnsmasq/
$NAME
.pid
\
${
MAILHOSTNAME
:+
-m
$MAILHOSTNAME
}
\
${
MAILTARGET
:+
-t
$MAILTARGET
}
\
${
DNSMASQ_USER
:+
-u
$DNSMASQ_USER
}
\
...
...
debian/postinst
View file @
47901154
...
...
@@ -21,7 +21,7 @@ if [ -x /etc/init.d/dnsmasq ]; then
update-rc.d dnsmasq defaults 15 85
>
/dev/null
if
[
"
$1
"
=
"configure"
]
||
[
"
$1
"
=
"abort-upgrade"
]
;
then
if
[
-e
/
var/
run/dnsmasq/dnsmasq.pid
]
;
then
if
[
-e
/run/dnsmasq/dnsmasq.pid
]
;
then
ACTION
=
restart
else
ACTION
=
start
...
...
debian/resolvconf
View file @
47901154
...
...
@@ -13,7 +13,7 @@
set
-e
RUN_DIR
=
"/
var/
run/dnsmasq"
RUN_DIR
=
"/run/dnsmasq"
RSLVRLIST_FILE
=
"
${
RUN_DIR
}
/resolv.conf"
TMP_FILE
=
"
${
RSLVRLIST_FILE
}
_new.
$$
"
MY_NAME_FOR_RESOLVCONF
=
"dnsmasq"
...
...
debian/rules
View file @
47901154
...
...
@@ -134,7 +134,6 @@ binary-arch: checkroot
-d debian/base/etc/dbus-1/system.d \
-d debian/base/usr/share/doc/$(package) \
-d debian/base/usr/share/doc/$(package)/examples \
-d debian/base/var/run \
-d debian/base/usr/share/$(package) \
-d debian/base/var/lib/misc
make $(TARGET) PREFIX=/usr DESTDIR=`pwd`/debian/base CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" COPTS="$(DEB_COPTS)" CC=gcc
...
...
debian/systemd.service
View file @
47901154
...
...
@@ -4,7 +4,7 @@ Requires=network.target
[Service]
Type=forking
PIDFile=/
var/
run/dnsmasq/dnsmasq.pid
PIDFile=/run/dnsmasq/dnsmasq.pid
# Test the config file and refuse starting if it is not valid.
ExecStartPre=/usr/sbin/dnsmasq --test
...
...
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