Commit 55e1f69b authored by Lorenzo Faletra's avatar Lorenzo Faletra

Import Debian version 1.47+parrot0

init-system-helpers (1.47+parrot0) testing; urgency=medium

  * Import new Debian release

init-system-helpers (1.47) unstable; urgency=medium

  [ Christian Hofstaedtler ]
  * Align policy-rc.d existing/nonexisting case for custom actions.
    Previously, when calling invoke-rc.d with a "custom" action, it
    would print an error when a policy-rc.d file was installed, but
    it would be silent if no such file was installed. (Closes: #728682)

  [ Andreas Henriksson ]
  * Do policy-rc.d automatically in init-less chroots.
    See #838966 and #838997 for background.
    A debootstrap with --variant=minbase will have lsb-base installed,
    so the person running into this issue must have:
     - not added a policy-rc.d in his init-less chroot
     - removed lsb-base manually (and what else?)
    This patch auto-detects the situation with init-less chroot that's
    missing a policy-rc.d and deals with it automatically (plus gives
    a warning message). (Closes: #843761)

  [ Ondřej Nový ]
  * Add try-restart action.
    See #851688

  [ Felipe Sateler ]
  * Make init depend on a new enough init-system-helpers.
    In jessie, update-rc.d/invoke-rc.d/service are shipped by sysv-rc.
    They got moved to init-system-helpers after that, so make sure we
    have the new versions to ensure the scripts are available.
    This dependency can probably be dropped after stretch is released.
  * update-rc.d: allow trailing whitespace in LSB header delimiters.
    It is a hard to diagnose condition because trailing spaces are
    invisible in most editors. Moreover, all the other parsers (systemd,
    insserv) allow such trailing space. (Closes: #851730)
 init-system-helpers (1.46) unstable; urgency=medium

  * Drop dh-systemd transitional package.
    It is now provided by debhelper (Closes: #841914)
  * Add a meaningful short description to init metapackage
  * Document copyright of things lifted from pkg:sysvinit (Closes: #839545)
  * Use https url for copyright format
parent 344808ce
init-system-helpers (1.47+parrot0) testing; urgency=medium
* Import new Debian release
-- Lorenzo "Palinuro" Faletra <palinuro@parrotsec.org> Fri, 03 Feb 2017 02:59:27 +0100
init-system-helpers (1.47) unstable; urgency=medium
[ Christian Hofstaedtler ]
* Align policy-rc.d existing/nonexisting case for custom actions.
Previously, when calling invoke-rc.d with a "custom" action, it
would print an error when a policy-rc.d file was installed, but
it would be silent if no such file was installed. (Closes: #728682)
[ Andreas Henriksson ]
* Do policy-rc.d automatically in init-less chroots.
See #838966 and #838997 for background.
A debootstrap with --variant=minbase will have lsb-base installed,
so the person running into this issue must have:
- not added a policy-rc.d in his init-less chroot
- removed lsb-base manually (and what else?)
This patch auto-detects the situation with init-less chroot that's
missing a policy-rc.d and deals with it automatically (plus gives
a warning message). (Closes: #843761)
[ Ondřej Nový ]
* Add try-restart action.
See #851688
[ Felipe Sateler ]
* Make init depend on a new enough init-system-helpers.
In jessie, update-rc.d/invoke-rc.d/service are shipped by sysv-rc.
They got moved to init-system-helpers after that, so make sure we
have the new versions to ensure the scripts are available.
This dependency can probably be dropped after stretch is released.
* update-rc.d: allow trailing whitespace in LSB header delimiters.
It is a hard to diagnose condition because trailing spaces are
invisible in most editors. Moreover, all the other parsers (systemd,
insserv) allow such trailing space. (Closes: #851730)
-- Felipe Sateler <fsateler@debian.org> Wed, 18 Jan 2017 10:17:07 -0300
init-system-helpers (1.46) unstable; urgency=medium
* Drop dh-systemd transitional package.
It is now provided by debhelper (Closes: #841914)
* Add a meaningful short description to init metapackage
* Document copyright of things lifted from pkg:sysvinit (Closes: #839545)
* Use https url for copyright format
-- Felipe Sateler <fsateler@debian.org> Sun, 06 Nov 2016 17:02:00 -0300
init-system-helpers (1.45parrot0) testing; urgency=medium
* Import new version from debian
......@@ -65,7 +117,7 @@ init-system-helpers (1.33+parrot2) testing; urgency=medium
* Add Parrot blacklist
* Add Parrot whitelist
* Add some jokes
* Modify the code to make network services automatically disabled
* Modify the code to make network services automatically disabled
-- Lorenzo "Palinuro" Faletra <eclipse@parrotsec.org> Wed, 15 Jun 2016 17:08:56 +0200
......
......@@ -40,15 +40,6 @@ Description: helper tools for all init systems
specific to systemd at all. Maintainers of other init systems are welcome to
include their helpers in this package.
Package: dh-systemd
Section: oldlibs
Architecture: all
Multi-Arch: foreign
Depends: debhelper (>= 9.20160709),
${misc:Depends},
Description: debhelper add-on to handle systemd unit files - transitional package
This package is for transitional purposes and can be removed safely.
Package: init
Section: metapackages
Architecture: any
......@@ -56,9 +47,9 @@ Priority: important
XB-Important: yes
Multi-Arch: foreign
Pre-Depends: systemd-sysv [linux-any] ${alt:sysvinit},
Depends: init-system-helpers,
Depends: init-system-helpers (>= 1.25),
${misc:Depends},
Description: init metapackage
Description: metapackage ensuring an init system is installed
This package is a metapackage which allows you to select from the available
init systems while ensuring that one of these is available on the system at
all times.
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Files: *
Copyright: 2013 Michael Stapelberg
......@@ -8,10 +8,37 @@ Files: debian/*
Copyright: 2013 Michael Stapelberg <stapelberg@debian.org>
License: BSD-3-clause
License: GPL-3+
On Debian systems the full text of the GNU General Public
License can be found in the `/usr/share/common-licenses/GPL'
file.
Files: script/service man8/service.8
Copyright: 2006 Red Hat, Inc
2008 Canonical Ltd
License: GPL-2+
Files: script/invoke-rc.d man8/invoke-rc.d.8
Copyright: 2000,2001 Henrique de Moraes Holschuh <hmh@debian.org>
License: GPL-2+
Files: script/update-rc.d man8/update-rc.d.8
Copyright: 1997-2005 Miquel van Smoorenburg <miquels@cistron.nl>
Members of the pkg-sysvinit project
License: GPL-2+
License: GPL-2+
This program 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, or (at your option)
any later version.
.
This program 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, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
.
On Debian systems, the complete text of the GNU General Public License
version 2 can be found in ‘/usr/share/common-licenses/GPL-2’.
License: BSD-3-clause
Copyright © 2013 Michael Stapelberg
......
......@@ -36,7 +36,7 @@ invoke-rc.d [options] <basename> <action> [extra initscript parameters...]
basename - Initscript ID, as per update-rc.d(8)
action - Initscript action. Known actions are:
start, [force-]stop, restart,
start, [force-]stop, [try-]restart,
[force-]reload, status
(status is there because of the LSB. Debian does not use it).
......
......@@ -44,6 +44,7 @@ The standard actions are:
.IR stop ,
.IR force\-stop ,
.IR restart ,
.IR try\-restart ,
.IR reload ,
.IR force\-reload ,
and
......
......@@ -57,7 +57,7 @@ Usage:
basename - Initscript ID, as per update-rc.d(8)
action - Initscript action. Known actions are:
start, [force-]stop, restart,
start, [force-]stop, [try-]restart,
[force-]reload, status
WARNING: not all initscripts implement all of the above actions.
......@@ -124,7 +124,7 @@ querypolicy () {
policyaction="${ACTION}"
if test x${RC} = "x101" ; then
if test "${ACTION}" = "start" || test "${ACTION}" = "restart" ; then
if test "${ACTION}" = "start" || test "${ACTION}" = "restart" || test "${ACTION}" = "try-restart"; then
policyaction="(${ACTION})"
fi
fi
......@@ -176,6 +176,15 @@ if test "x${POLICYHELPER}" != x && test -x "${POLICYHELPER}" ; then
;;
esac
else
if test ! -e "/sbin/init" ; then
if test x${FORCE} != x ; then
printerror "WARNING: No init system and policy-rc.d missing, but force specified so proceeding."
else
printerror "WARNING: No init system and policy-rc.d missing! Defaulting to block."
RC=101
fi
fi
if test x${RC} = x ; then
RC=104
fi
......@@ -257,17 +266,6 @@ fi
#NOTE: It may not be obvious, but "$@" from this point on must expand
#to the extra initscript parameters, except inside functions.
## sanity checks and just-in-case warnings.
case ${ACTION} in
start|stop|force-stop|restart|reload|force-reload|status)
;;
*)
if test "x${POLICYHELPER}" != x && test -x "${POLICYHELPER}" ; then
printerror action ${ACTION} is unknown, but proceeding anyway.
fi
;;
esac
# Operate against system upstart, not session
unset UPSTART_SESSION
# If we're running on upstart and there's an upstart job of this name, do
......@@ -382,7 +380,7 @@ RC=
### to allow start or restart.
if [ -n "$is_systemd" ]; then
case ${ACTION} in
start|restart)
start|restart|try-restart)
# Note that systemd 215 does not yet support is-enabled for SysV scripts,
# this works only with systemd >= 220-1 (systemd-sysv-install). Add a
# simple fallback check which can be dropped after releasing stretch.
......@@ -408,7 +406,7 @@ else
fi
case ${ACTION} in
start|restart)
start|restart|try-restart)
if testexec ${SLINK} ; then
RC=104
elif testexec ${KLINK} ; then
......@@ -559,7 +557,7 @@ if test x${FORCE} != x || test ${RC} -eq 104 ; then
sctl_args="--job-mode=ignore-dependencies"
fi
case $saction in
start|restart)
start|restart|try-restart)
[ "$_state" != "LoadState=masked" ] || exit 0
systemctl $sctl_args "${saction}" "${UNIT}" && exit 0
;;
......@@ -605,7 +603,7 @@ if test x${FORCE} != x || test ${RC} -eq 104 ; then
fi
done
printerror initscript ${INITSCRIPTID}, action \"${saction}\" failed.
if [ -n "$is_systemd" ] && [ "$saction" = start -o "$saction" = restart ]; then
if [ -n "$is_systemd" ] && [ "$saction" = start -o "$saction" = restart -o "$saction" = "try-restart" ]; then
systemctl status --no-pager "${UNIT}" || true
fi
exit ${RC}
......
......@@ -95,6 +95,7 @@ __DATA__
#
apache2 disabled
avahi-daemon disabled
couchdb disabled
clamav-daemon disabled
clamav-freshclam disabled
cups disabled
......
......@@ -194,7 +194,7 @@ then
fi
case "${ACTION}" in
restart|status)
restart|status|try-restart)
exec systemctl $sctl_args ${ACTION} ${UNIT}
;;
start|stop)
......
......@@ -337,10 +337,10 @@ sub parse_def_start_stop {
open my $fh, '<', $script or error("unable to read $script");
while (<$fh>) {
chomp;
if (m/^### BEGIN INIT INFO$/) {
if (m/^### BEGIN INIT INFO\s*$/) {
$lsb{'begin'}++;
}
elsif (m/^### END INIT INFO$/) {
elsif (m/^### END INIT INFO\s*$/) {
$lsb{'end'}++;
last;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment