diff options
| author | Lucas de Castro Borges <lucas@gnuabordo.com.br> | 2024-06-03 19:41:55 -0300 |
|---|---|---|
| committer | Lucas de Castro Borges <lucas@gnuabordo.com.br> | 2024-06-03 19:41:55 -0300 |
| commit | 2867b4bd490c6549a39a4586aeafbf83358dd183 (patch) | |
| tree | 785a7c853335a332ebca8aabe4cb84f7d7b6afb1 | |
| parent | 8cf24f12b3d1dba0f5d8e84bc84d67d8ecfac903 (diff) | |
New upstream version 1.0.10
| -rw-r--r-- | debian/README.Debian | 7 | ||||
| -rw-r--r-- | debian/changelog | 5 | ||||
| -rw-r--r-- | debian/compat | 1 | ||||
| -rw-r--r-- | debian/control | 15 | ||||
| -rw-r--r-- | debian/copyright | 23 | ||||
| -rw-r--r-- | debian/foolsm.init | 97 | ||||
| -rw-r--r-- | debian/foolsm.service | 14 | ||||
| -rw-r--r-- | debian/rules | 25 | ||||
| -rw-r--r-- | debian/source/format | 1 | ||||
| -rw-r--r-- | foolsm.spec | 5 |
10 files changed, 192 insertions, 1 deletions
diff --git a/debian/README.Debian b/debian/README.Debian new file mode 100644 index 0000000..1d6cbf4 --- /dev/null +++ b/debian/README.Debian @@ -0,0 +1,7 @@ +foolsm for Debian +---------------- + +This package only supports systemd. If you don't use systemd, you'll have to +invoke foolsm directly or create a sysV script to manage it. + + -- Roberto Suárez Soto <robe@allenta.com> Tue, 18 Jul 2017 08:30:49 +0000 diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..b2bfb94 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +foolsm (1.0.9-1) unstable; urgency=medium + + * Initial release. + + -- Roberto Suárez Soto <robe@allenta.com> Tue, 18 Jul 2017 08:30:49 +0000 diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..ec63514 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +9 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..2d28e4c --- /dev/null +++ b/debian/control @@ -0,0 +1,15 @@ +Source: foolsm +Section: net +Priority: optional +Maintainer: Roberto Suárez Soto <robe@allenta.com> +Build-Depends: debhelper (>=9), dh-systemd +Standards-Version: 3.9.6 +Homepage: https://lsm.foobar.fi/ + +Package: foolsm +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Foolsm is the Foobar Link Status Monitor + Foolsm can ping multiple targets and when up or down event happens + it will execute user configured external script so it can be used + as poor man's routing protocol. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..9de2429 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,23 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: foolsm +Source: https://lsm.foobar.fi/ + +Files: * +Copyright: 2009-2017 Mika Ilmaranta <ilmis@nullnet.fi> +License: GPL-2 + This package is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + . + This package is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + . + You should have received a copy of the GNU General Public License + along with this program. If not, see <https://www.gnu.org/licenses/> + . + On Debian systems, the complete text of the GNU General + Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". + diff --git a/debian/foolsm.init b/debian/foolsm.init new file mode 100644 index 0000000..e9e12ea --- /dev/null +++ b/debian/foolsm.init @@ -0,0 +1,97 @@ +#!/bin/sh +# +# /etc/init.d/foolsm +# +# This shellscript takes care of starting and stopping foolsm. +# +# chkconfig: - 79 31 +# description: Foolsm, Link Status Monitor +# +### BEGIN INIT INFO +# Provides: foolsm +# Required-Start: $network $syslog +# Required-Stop: +# Default-Stop: 0 1 6 +# Short-Description: Foolsm - link status monitor +# Description: Foolsm is the link status monitor +# Foolsm can ping multiple targets and when up or down event happens +# it will execute user configured external script so it can be used +# as poor man's routing protocol. +### END INIT INFO + +# Source function library. +. /etc/init.d/functions + +# Source networking configuration. +. /etc/sysconfig/network + +# Check that networking is up. +[ ${NETWORKING} = "no" ] && exit 0 + +CONFIGFILE="/etc/foolsm/foolsm.conf" +PIDFILE="/var/run/foolsm.pid" + +[ -f /etc/sysconfig/foolsm ] && . /etc/sysconfig/foolsm +[ -x /usr/sbin/foolsm ] || exit 0 + +RETVAL=0 + +start() { + echo -n $"Starting foolsm: " + daemon --pidfile=${PIDFILE} /usr/sbin/foolsm --config $CONFIGFILE --pidfile $PIDFILE + RETVAL=$? + /bin/usleep 10000 + echo + [ $RETVAL = 0 ] && touch /var/lock/subsys/foolsm + return $RETVAL +} + +stop() { + echo -n $"Stopping foolsm: " + killproc /usr/sbin/foolsm + RETVAL=$? + echo + [ $RETVAL = 0 ] && rm -f /var/lock/subsys/foolsm + return $RETVAL +} + +restart() { + stop + start +} + +reload() { + echo -n $"Reloading foolsm: " + killproc -p ${PIDFILE} /usr/sbin/foolsm -HUP + RETVAL=$? + echo + return $RETVAL +} + +# See how we were called. +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart) + restart + ;; + reload) + reload + ;; + condrestart) + [ -f /var/lock/subsys/foolsm ] && restart + ;; + status) + status -p ${PIDFILE} foolsm + RETVAL=$? + ;; + *) + echo "Usage: foolsm {start|stop|restart|condrestart|status}" + RETVAL=2 +esac + +exit $RETVAL diff --git a/debian/foolsm.service b/debian/foolsm.service new file mode 100644 index 0000000..5d53c9e --- /dev/null +++ b/debian/foolsm.service @@ -0,0 +1,14 @@ +[Unit] +Description=Foolsm is the link status monitor +Documentation=https://lsm.foobar.fi/ +Wants=network-online.target +After=network-online.target shorewall.service shorewall6.service + +[Service] +Type=simple +ExecStart=/usr/sbin/foolsm --config /etc/foolsm/foolsm.conf --no-fork +ExecReload=/bin/kill -HUP $MAINPID +Restart=on-abort + +[Install] +WantedBy=multi-user.target diff --git a/debian/rules b/debian/rules new file mode 100644 index 0000000..b6126d7 --- /dev/null +++ b/debian/rules @@ -0,0 +1,25 @@ +#!/usr/bin/make -f +# See debhelper(7) (uncomment to enable) +# output every command that modifies files on the build system. +#export DH_VERBOSE = 1 + + +# see FEATURE AREAS in dpkg-buildflags(1) +#export DEB_BUILD_MAINT_OPTIONS = hardening=+all + +# see ENVIRONMENT in dpkg-buildflags(1) +# package maintainers to append CFLAGS +#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic +# package maintainers to append LDFLAGS +#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed +export PREFIX=/usr + +%: + dh $@ --with=systemd + + +# dh_make generated override targets +# This is example for Cmake (See https://bugs.debian.org/641051 ) +#override_dh_auto_configure: +# dh_auto_configure -- # -DCMAKE_LIBRARY_PATH=$(DEB_HOST_MULTIARCH) + diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 0000000..163aaf8 --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/foolsm.spec b/foolsm.spec index fbf7541..4094ed6 100644 --- a/foolsm.spec +++ b/foolsm.spec @@ -7,7 +7,7 @@ Summary: The Foobar Link Status Monitor Name: foolsm -Version: 1.0.9 +Version: 1.0.10 Release: 1%{?dist} License: GPLv2 URL: http://lsm.foobar.fi/ @@ -180,6 +180,9 @@ fi %dir %{_sharedstatedir}/foolsm %changelog +* Tue Jul 25 2017 Mika Ilmaranta <ilmis@nullnet.fi> - 1.0.10-1 +- debian patch from Roberto Suárez Soto + * Sun Dec 18 2016 Mika Ilmaranta <ilmis@nullnet.fi> - 1.0.9-1 - README: fixed note about assumed start state |
