Modified dnsmasq-config to add support for Debian packaging. Test Plan: PASS: Package installed and ISO built successfully Story: 2009256 Task: 43721 Signed-off-by: Matheus Machado Guilhermino <Matheus.MachadoGuilhermino@windriver.com> Change-Id: Ic764b23798f1adeba66667f1b640f4243537778fchanges/91/815091/12
parent
5a15601ae0
commit
e5392a1546
@ -0,0 +1,5 @@
|
||||
dnsmasq-config (1.0-1) unstable; urgency=medium
|
||||
|
||||
* Initial release.
|
||||
|
||||
-- Matheus Guilhermino <matheus.machadoguilhermino@windriver.com> Fri, 22 Oct 2021 01:29:29 -0400
|
@ -0,0 +1,13 @@
|
||||
Source: dnsmasq-config
|
||||
Section: admin
|
||||
Priority: optional
|
||||
Maintainer: Starlingx Developers <starlingx-discuss@lists.starlingx.io>
|
||||
Build-Depends: debhelper-compat (= 13)
|
||||
Standards-Version: 4.4.1
|
||||
Homepage: https://www.starlingx.io
|
||||
|
||||
Package: dnsmasq-config
|
||||
Architecture: all
|
||||
Depends: ${misc:Depends}, dnsmasq
|
||||
Description: packages StarlingX configuration files of dnsmasq to system folder
|
||||
Installs dnsmasq init options to init.d directory.
|
@ -0,0 +1,27 @@
|
||||
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Upstream-Name: dnsmasq-config
|
||||
Source: https://opendev.org/starlingx/config-files/
|
||||
|
||||
Files: *
|
||||
Copyright: (c) 2013-2021 Wind River Systems, Inc
|
||||
License: Apache-2
|
||||
|
||||
Files: debian/*
|
||||
Copyright: 2021 Wind River Systems, Inc
|
||||
License: Apache-2
|
||||
|
||||
License: Apache-2
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
.
|
||||
https://www.apache.org/licenses/LICENSE-2.0
|
||||
.
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
.
|
||||
On Debian-based systems the full text of the Apache version 2.0 license
|
||||
can be found in `/usr/share/common-licenses/Apache-2.0'.
|
@ -0,0 +1 @@
|
||||
init usr/share/starlingx/dnsmasq
|
@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
cp /usr/share/starlingx/dnsmasq/init /etc/init.d/dnsmasq
|
||||
|
||||
chmod 755 /etc/init.d/dnsmasq
|
||||
|
||||
#DEBHELPER#
|
@ -0,0 +1,5 @@
|
||||
#!/usr/bin/make -f
|
||||
#export DH_VERBOSE = 1
|
||||
|
||||
%:
|
||||
dh $@
|
@ -0,0 +1 @@
|
||||
3.0 (quilt)
|
@ -0,0 +1,7 @@
|
||||
---
|
||||
debname: dnsmasq-config
|
||||
debver: 1.0-1
|
||||
src_path: source-debian
|
||||
revision:
|
||||
dist: $STX_DIST
|
||||
PKG_GITREVCOUNT: true
|
@ -0,0 +1,55 @@
|
||||
#!/bin/sh
|
||||
DAEMON=/usr/sbin/dnsmasq
|
||||
NAME=dnsmasq
|
||||
DESC="DNS forwarder and DHCP server"
|
||||
PIDFILE="/var/run/dnsmasq.pid"
|
||||
|
||||
test -f $DAEMON || exit 0
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
echo -n "starting $DESC: $NAME... "
|
||||
test -d /var/lib/misc/ || mkdir /var/lib/misc/
|
||||
start-stop-daemon -S -x $DAEMON --pidfile $PIDFILE -- $ARGS
|
||||
echo "done."
|
||||
echo -n "Refresh hosts cache"
|
||||
nscd -i hosts
|
||||
echo "done."
|
||||
;;
|
||||
stop)
|
||||
echo -n "stopping $DESC: $NAME... "
|
||||
start-stop-daemon -K -x $DAEMON --pidfile $PIDFILE
|
||||
rm -f $PIDFILE
|
||||
echo "done."
|
||||
;;
|
||||
status)
|
||||
echo -n "dnsmasq "
|
||||
start-stop-daemon -q -K -t -x $DAEMON --pidfile $PIDFILE
|
||||
RET=$?
|
||||
if [ "$RET" = "0" ]; then
|
||||
PID=`cat $PIDFILE`
|
||||
echo "($PID) is running"
|
||||
else
|
||||
echo "is not running"
|
||||
# For lsb compliance return 3 if process not running
|
||||
exit 3
|
||||
fi
|
||||
;;
|
||||
restart)
|
||||
echo "restarting $DESC: $NAME... "
|
||||
$0 stop
|
||||
$0 start
|
||||
echo "done."
|
||||
;;
|
||||
reload)
|
||||
echo -n "reloading $DESC: $NAME... "
|
||||
killall -HUP $(basename ${DAEMON})
|
||||
echo "done."
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|status|restart|reload}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
Loading…
Reference in new issue