From 4986d5f666fd95a5d451c99a2fa831497bf70534 Mon Sep 17 00:00:00 2001 From: Lucas de Castro Borges Date: Sun, 2 Jun 2024 22:35:55 -0300 Subject: Upstream project had been renamed Thereafter upstream had been renamed, it was required update name, manpages, service name to correcly install the software. --- debian/foolsm.init | 77 ++++++++++++++++++++++++ debian/foolsm.install | 1 + debian/foolsm.manpages | 1 + debian/foolsm.postinst | 46 ++++++++++++++ debian/foolsm.sgml | 158 +++++++++++++++++++++++++++++++++++++++++++++++++ debian/lsm.1 | 37 ------------ debian/lsm.init | 77 ------------------------ debian/lsm.install | 1 - debian/lsm.manpages | 1 - debian/lsm.postinst | 46 -------------- debian/lsm.sgml | 158 ------------------------------------------------- debian/rules | 2 +- 12 files changed, 284 insertions(+), 321 deletions(-) create mode 100755 debian/foolsm.init create mode 100644 debian/foolsm.install create mode 100644 debian/foolsm.manpages create mode 100644 debian/foolsm.postinst create mode 100644 debian/foolsm.sgml delete mode 100644 debian/lsm.1 delete mode 100755 debian/lsm.init delete mode 100644 debian/lsm.install delete mode 100644 debian/lsm.manpages delete mode 100644 debian/lsm.postinst delete mode 100644 debian/lsm.sgml diff --git a/debian/foolsm.init b/debian/foolsm.init new file mode 100755 index 0000000..4a9c966 --- /dev/null +++ b/debian/foolsm.init @@ -0,0 +1,77 @@ +#!/bin/sh +# kFreeBSD do not accept scripts as interpreters, using #!/bin/sh and sourcing. +#if [ true != "$INIT_D_SCRIPT_SOURCED" ] ; then +# set "$0" "$@"; INIT_D_SCRIPT_SOURCED=true . /lib/init/init-d-script +#fi +### BEGIN INIT INFO +# Provides: lsm +# Required-Start: $remote_fs $syslog +# Required-Stop: $remote_fs $syslog +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Monitor Link connection. +# Description: +# <...> +# <...> +### END INIT INFO + +# Author: Lucas de Castro Borges +NAME=lsm +DESC="Link Monitor" +DAEMON=/usr/sbin/lsm +PIDFILE=/var/run/$NAME.pid +CONFIG=/etc/lsm/lsm.conf + +PATH=/sbin:/bin:/usr/sbin:/usr/bin + +. /lib/lsb/init-functions + +if [ ! -x $DAEMON ]; then + log_daemon_msg "lsm" "exectuble missing" + log_progress_msg "not starting" + log_end_msg 1 +fi + +if [ ! -r $CONFIG ]; then + log_daemon_msg "config file missing - not starting" + log_end_msg 1 +fi + +do_start() { + start-stop-daemon --start --quiet -p $PIDFILE -x $DAEMON -- --config $CONFIG +} +do_stop() { + start-stop-daemon --stop --quiet -p $PIDFILE -x $DAEMON -- --config $CONFIG +} + +case "$1" in + start) + log_daemon_msg "Starting Link Monitor." "lsm" + do_start + case "$?" in + 0) log_end_msg 0 ;; + 1) log_progress_msg "Already started" + log_end_msg 0 ;; + *) log_end_msg 1 ;; + esac + ;; + stop) + log_daemon_msg "Stopping Link Monitor." "lsm" + do_stop + case "$?" in + 0) rm $PIDFILE + log_end_msg 0 ;; + 1) log_progress_msg "Already stopped" + log_end_msg 0 ;; + *) log_end_msg 1 ;; + esac + + ;; + status) + status_of_proc -p $PIDFILE $DAEMON $NAME && exit 0 || exit $? + ;; + *) + program_name=$0 + echo "Usage: ${program_name} {start|stop|status|restart}" + ;; +esac diff --git a/debian/foolsm.install b/debian/foolsm.install new file mode 100644 index 0000000..6755c84 --- /dev/null +++ b/debian/foolsm.install @@ -0,0 +1 @@ +foolsm.service /lib/systemd/system/ diff --git a/debian/foolsm.manpages b/debian/foolsm.manpages new file mode 100644 index 0000000..7b5385b --- /dev/null +++ b/debian/foolsm.manpages @@ -0,0 +1 @@ +debian/foolsm.1 diff --git a/debian/foolsm.postinst b/debian/foolsm.postinst new file mode 100644 index 0000000..82397a6 --- /dev/null +++ b/debian/foolsm.postinst @@ -0,0 +1,46 @@ +#!/bin/sh +# postinst script for lsm +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `configure' +# * `abort-upgrade' +# * `abort-remove' `in-favour' +# +# * `abort-remove' +# * `abort-deconfigure' `in-favour' +# `removing' +# +# for details, see https://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + configure) + + echo "|===================================================|" + echo "| |" + echo "| Edit /etc/lsm/lsm.conf to setup lsm |" + echo "| and run invoke-rc.d lsm start to get lsm running |" + echo "| |" + echo "| ==================================================|" + exit 0 + ;; + abort-upgrade|abort-remove|abort-deconfigure) + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 diff --git a/debian/foolsm.sgml b/debian/foolsm.sgml new file mode 100644 index 0000000..c57e269 --- /dev/null +++ b/debian/foolsm.sgml @@ -0,0 +1,158 @@ + manpage.1'. You may view + the manual page with: `docbook-to-man manpage.sgml | nroff -man | + less'. A typical entry in a Makefile or Makefile.am is: + +manpage.1: manpage.sgml + docbook-to-man $< > $@ + + + The docbook-to-man binary is found in the docbook-to-man package. + Please remember that if you create the nroff version in one of the + debian/rules file targets (such as build), you will need to include + docbook-to-man in your Build-Depends control field. + + --> + + + Lucas"> + de Castro Borges"> + + May 9 2016"> + + 1"> + lucascastroborges@gmail.com"> + + lsm"> + + + Debian"> + GNU"> + GPL"> +]> + + + +
+ &dhemail; +
+ + &dhfirstname; + &dhsurname; + + + 2003 + &dhusername; + + &dhdate; +
+ + &dhucpackage; + + &dhsection; + + + &dhpackage; + + Monitor connectivity status + + + + &dhpackage; + + + + + + + DESCRIPTION + + LSM is a link connectivity monitor tool. + + LSM can be used to monitor a Linux router/firewall connectivity. + If it has multiple connections it can change routing when an + up/down event happens by utilizing external script. + + + + OPTIONS + + + + + | + + + Show summary of options. + + + + + + + + Show version of program. + + + + + + + + Specify an alternative config file instead of the default one. + + + + + + + + Specify an alternative pid file instead of the default one. + + + + + + + Make instance independent of others one already running. + + + + + + + AUTHOR + + This manual page was written by &dhusername; &dhemail; for + the &debian; system (and may be used by others). Permission is + granted to copy, distribute and/or modify this document under + the terms of the &gnu; General Public License, Version 2 any + later version published by the Free Software Foundation. + + + On Debian systems, the complete text of the GNU General Public + License can be found in /usr/share/common-licenses/GPL. + + + +
+ + diff --git a/debian/lsm.1 b/debian/lsm.1 deleted file mode 100644 index 5b9f1a4..0000000 --- a/debian/lsm.1 +++ /dev/null @@ -1,37 +0,0 @@ -.TH "lsm" "1" -.SH "NAME" -lsm \(em Monitor connectivity status -.SH "SYNOPSIS" -.PP -\fBlsm\fR [\fBOPTIONS...\fP] -.SH "DESCRIPTION" -.PP -LSM is a link connectivity monitor tool. -.PP -LSM can be used to monitor a Linux router/firewall connectivity. -If it has multiple connections it can change routing when an -up/down event happens by utilizing external script. -.SH "OPTIONS" -.IP "\fB-h\fP | \fB\-\-help\fP " 10 -Show summary of options. -.IP "\fB-v\fP \fB\-\-version\fP " 10 -Show version of program. -.IP "\fB-c\fP \fB\-\-config FILE\fP " 10 -Specify an alternative config file instead of the default one. -.IP "\fB-p\fP \fB\-\-pidfile FILE\fP " 10 -Specify an alternative pid file instead of the default one. -.IP "\fB-f\fP \fB\-\-no-fork\fP " 10 -Make instance independent of others one already running. -.SH "AUTHOR" -.PP -This manual page was written by Lucas de Castro Borges lucascastroborges@gmail.com for -the \fBDebian\fP system (and may be used by others). Permission is -granted to copy, distribute and/or modify this document under -the terms of the GNU General Public License, Version 2 any -later version published by the Free Software Foundation. - -.PP -On Debian systems, the complete text of the GNU General Public -License can be found in /usr/share/common-licenses/GPL. - -.\" created by instant / docbook-to-man diff --git a/debian/lsm.init b/debian/lsm.init deleted file mode 100755 index 4a9c966..0000000 --- a/debian/lsm.init +++ /dev/null @@ -1,77 +0,0 @@ -#!/bin/sh -# kFreeBSD do not accept scripts as interpreters, using #!/bin/sh and sourcing. -#if [ true != "$INIT_D_SCRIPT_SOURCED" ] ; then -# set "$0" "$@"; INIT_D_SCRIPT_SOURCED=true . /lib/init/init-d-script -#fi -### BEGIN INIT INFO -# Provides: lsm -# Required-Start: $remote_fs $syslog -# Required-Stop: $remote_fs $syslog -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 -# Short-Description: Monitor Link connection. -# Description: -# <...> -# <...> -### END INIT INFO - -# Author: Lucas de Castro Borges -NAME=lsm -DESC="Link Monitor" -DAEMON=/usr/sbin/lsm -PIDFILE=/var/run/$NAME.pid -CONFIG=/etc/lsm/lsm.conf - -PATH=/sbin:/bin:/usr/sbin:/usr/bin - -. /lib/lsb/init-functions - -if [ ! -x $DAEMON ]; then - log_daemon_msg "lsm" "exectuble missing" - log_progress_msg "not starting" - log_end_msg 1 -fi - -if [ ! -r $CONFIG ]; then - log_daemon_msg "config file missing - not starting" - log_end_msg 1 -fi - -do_start() { - start-stop-daemon --start --quiet -p $PIDFILE -x $DAEMON -- --config $CONFIG -} -do_stop() { - start-stop-daemon --stop --quiet -p $PIDFILE -x $DAEMON -- --config $CONFIG -} - -case "$1" in - start) - log_daemon_msg "Starting Link Monitor." "lsm" - do_start - case "$?" in - 0) log_end_msg 0 ;; - 1) log_progress_msg "Already started" - log_end_msg 0 ;; - *) log_end_msg 1 ;; - esac - ;; - stop) - log_daemon_msg "Stopping Link Monitor." "lsm" - do_stop - case "$?" in - 0) rm $PIDFILE - log_end_msg 0 ;; - 1) log_progress_msg "Already stopped" - log_end_msg 0 ;; - *) log_end_msg 1 ;; - esac - - ;; - status) - status_of_proc -p $PIDFILE $DAEMON $NAME && exit 0 || exit $? - ;; - *) - program_name=$0 - echo "Usage: ${program_name} {start|stop|status|restart}" - ;; -esac diff --git a/debian/lsm.install b/debian/lsm.install deleted file mode 100644 index 3fe34fe..0000000 --- a/debian/lsm.install +++ /dev/null @@ -1 +0,0 @@ -lsm.service /lib/systemd/system/ diff --git a/debian/lsm.manpages b/debian/lsm.manpages deleted file mode 100644 index c7ce619..0000000 --- a/debian/lsm.manpages +++ /dev/null @@ -1 +0,0 @@ -debian/lsm.1 diff --git a/debian/lsm.postinst b/debian/lsm.postinst deleted file mode 100644 index 82397a6..0000000 --- a/debian/lsm.postinst +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/sh -# postinst script for lsm -# -# see: dh_installdeb(1) - -set -e - -# summary of how this script can be called: -# * `configure' -# * `abort-upgrade' -# * `abort-remove' `in-favour' -# -# * `abort-remove' -# * `abort-deconfigure' `in-favour' -# `removing' -# -# for details, see https://www.debian.org/doc/debian-policy/ or -# the debian-policy package - - -case "$1" in - configure) - - echo "|===================================================|" - echo "| |" - echo "| Edit /etc/lsm/lsm.conf to setup lsm |" - echo "| and run invoke-rc.d lsm start to get lsm running |" - echo "| |" - echo "| ==================================================|" - exit 0 - ;; - abort-upgrade|abort-remove|abort-deconfigure) - ;; - - *) - echo "postinst called with unknown argument \`$1'" >&2 - exit 1 - ;; -esac - -# dh_installdeb will replace this with shell code automatically -# generated by other debhelper scripts. - -#DEBHELPER# - -exit 0 diff --git a/debian/lsm.sgml b/debian/lsm.sgml deleted file mode 100644 index c57e269..0000000 --- a/debian/lsm.sgml +++ /dev/null @@ -1,158 +0,0 @@ - manpage.1'. You may view - the manual page with: `docbook-to-man manpage.sgml | nroff -man | - less'. A typical entry in a Makefile or Makefile.am is: - -manpage.1: manpage.sgml - docbook-to-man $< > $@ - - - The docbook-to-man binary is found in the docbook-to-man package. - Please remember that if you create the nroff version in one of the - debian/rules file targets (such as build), you will need to include - docbook-to-man in your Build-Depends control field. - - --> - - - Lucas"> - de Castro Borges"> - - May 9 2016"> - - 1"> - lucascastroborges@gmail.com"> - - lsm"> - - - Debian"> - GNU"> - GPL"> -]> - - - -
- &dhemail; -
- - &dhfirstname; - &dhsurname; - - - 2003 - &dhusername; - - &dhdate; -
- - &dhucpackage; - - &dhsection; - - - &dhpackage; - - Monitor connectivity status - - - - &dhpackage; - - - - - - - DESCRIPTION - - LSM is a link connectivity monitor tool. - - LSM can be used to monitor a Linux router/firewall connectivity. - If it has multiple connections it can change routing when an - up/down event happens by utilizing external script. - - - - OPTIONS - - - - - | - - - Show summary of options. - - - - - - - - Show version of program. - - - - - - - - Specify an alternative config file instead of the default one. - - - - - - - - Specify an alternative pid file instead of the default one. - - - - - - - Make instance independent of others one already running. - - - - - - - AUTHOR - - This manual page was written by &dhusername; &dhemail; for - the &debian; system (and may be used by others). Permission is - granted to copy, distribute and/or modify this document under - the terms of the &gnu; General Public License, Version 2 any - later version published by the Free Software Foundation. - - - On Debian systems, the complete text of the GNU General Public - License can be found in /usr/share/common-licenses/GPL. - - - -
- - diff --git a/debian/rules b/debian/rules index 9fa378a..18b4dd0 100755 --- a/debian/rules +++ b/debian/rules @@ -8,7 +8,7 @@ export DEB_BUILD_MAINT_OPTIONS = hardening=+all dh $@ override_dh_auto_build: - docbook-to-man debian/lsm.sgml > debian/lsm.1 + docbook-to-man debian/foolsm.sgml > debian/foolsm.1 dh_auto_build -- PREFIX=/usr override_dh_installchangelogs: -- cgit v1.2.3