From 5f02fb649d51d32efeee71919d69e08126cce8c9 Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Wed, 10 Jan 2007 23:46:56 +0000 Subject: [PATCH] Fix some restart issues and unmount svcdir from 1.12 if needed. Package-Manager: portage-2.1.2_rc4-r7 --- sys-apps/baselayout/ChangeLog | 9 +- sys-apps/baselayout/Manifest | 19 +- .../baselayout-1.13.0_alpha11-r1.ebuild | 296 +++++++++++++ .../baselayout-1.13.0_alpha11-r2484.patch | 408 ++++++++++++++++++ .../files/digest-baselayout-1.13.0_alpha11-r1 | 3 + 5 files changed, 730 insertions(+), 5 deletions(-) create mode 100644 sys-apps/baselayout/baselayout-1.13.0_alpha11-r1.ebuild create mode 100644 sys-apps/baselayout/files/baselayout-1.13.0_alpha11-r2484.patch create mode 100644 sys-apps/baselayout/files/digest-baselayout-1.13.0_alpha11-r1 diff --git a/sys-apps/baselayout/ChangeLog b/sys-apps/baselayout/ChangeLog index 9719bff1c530..878dac42c178 100644 --- a/sys-apps/baselayout/ChangeLog +++ b/sys-apps/baselayout/ChangeLog @@ -1,10 +1,17 @@ # ChangeLog for sys-apps/baselayout # Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/baselayout/ChangeLog,v 1.391 2007/01/10 12:00:29 uberlord Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/baselayout/ChangeLog,v 1.392 2007/01/10 23:46:56 uberlord Exp $ # See the rc-scripts ChangeLog in subversion for release info: # http://sources.gentoo.org/viewcvs.py/*checkout*/baselayout/trunk/ChangeLog +*baselayout-1.13.0_alpha11-r1 (10 Jan 2007) + + 10 Jan 2007; Roy Marples + +files/baselayout-1.13.0_alpha11-r2484.patch, + +baselayout-1.13.0_alpha11-r1.ebuild: + Fix some restart issues and unmount svcdir from 1.12 if needed. + *baselayout-1.13.0_alpha11 (10 Jan 2007) 10 Jan 2007; Roy Marples diff --git a/sys-apps/baselayout/Manifest b/sys-apps/baselayout/Manifest index d4778213eb55..f640c815b1e7 100644 --- a/sys-apps/baselayout/Manifest +++ b/sys-apps/baselayout/Manifest @@ -70,6 +70,10 @@ AUX baselayout-1.13.0_alpha10-r2440.patch 2511 RMD160 7681a687c35fd000ee13e2b1e0 MD5 418a78aac276fda7361114f0b4ea9a39 files/baselayout-1.13.0_alpha10-r2440.patch 2511 RMD160 7681a687c35fd000ee13e2b1e074e3b8b8258784 files/baselayout-1.13.0_alpha10-r2440.patch 2511 SHA256 8bc7ff0ec1d14d7891304d53d215cb9effb219c26a28a9658b9a00c5f0eee026 files/baselayout-1.13.0_alpha10-r2440.patch 2511 +AUX baselayout-1.13.0_alpha11-r2484.patch 10821 RMD160 846363e9abb7d59fea68e105a7e11620eb31eaf2 SHA1 7543e0f5000f3e3d32b12576d2a798e163f75003 SHA256 ef1ea52850e563ef3e42b1424ab90dbd00b4e14e67aa66c155b711d7ef63bda4 +MD5 b98b9ac10133477f5dd2522c7778e0a1 files/baselayout-1.13.0_alpha11-r2484.patch 10821 +RMD160 846363e9abb7d59fea68e105a7e11620eb31eaf2 files/baselayout-1.13.0_alpha11-r2484.patch 10821 +SHA256 ef1ea52850e563ef3e42b1424ab90dbd00b4e14e67aa66c155b711d7ef63bda4 files/baselayout-1.13.0_alpha11-r2484.patch 10821 AUX copyright 2099 RMD160 43e295598125f39e375a1fcee6e642e37c8b8bd8 SHA1 3d5da783cc637392429ba2f63d321873fa1526ee SHA256 38db4636f65ce40ea505a6337138b041ac6be5998982193d16b1fbdeebb2bacd MD5 7c0cd50e4ac1dc062f5e6ab578e95659 files/copyright 2099 RMD160 43e295598125f39e375a1fcee6e642e37c8b8bd8 files/copyright 2099 @@ -129,14 +133,18 @@ EBUILD baselayout-1.13.0_alpha10.ebuild 9979 RMD160 a6cd64566591832f7a27ceed9865 MD5 3142bbab3c121b88c30c92eef33acbba baselayout-1.13.0_alpha10.ebuild 9979 RMD160 a6cd64566591832f7a27ceed9865c5243c0f55d3 baselayout-1.13.0_alpha10.ebuild 9979 SHA256 426ef12358ae0ff7bd6e112fbea601bbf263f605b7c7ccd2e0858a837f6a9bd6 baselayout-1.13.0_alpha10.ebuild 9979 +EBUILD baselayout-1.13.0_alpha11-r1.ebuild 10572 RMD160 a8d8cf43ae44b85d0049041c8173a82f253b39cb SHA1 1a6f9bba5aa0c3a658bad5f3af1b61ce666a4580 SHA256 280bd4e91343859f190c6d6f21061c853375a3bb27991de57ad65f061a435ca7 +MD5 7bf021bf066c3bd2df3209743742913e baselayout-1.13.0_alpha11-r1.ebuild 10572 +RMD160 a8d8cf43ae44b85d0049041c8173a82f253b39cb baselayout-1.13.0_alpha11-r1.ebuild 10572 +SHA256 280bd4e91343859f190c6d6f21061c853375a3bb27991de57ad65f061a435ca7 baselayout-1.13.0_alpha11-r1.ebuild 10572 EBUILD baselayout-1.13.0_alpha11.ebuild 10489 RMD160 dff64cdaef3410614faf5ecc81f3fa6a2869bb1a SHA1 1ea19d9cb207179dce601e5968837267150d3dcc SHA256 aa003f591b3f8d70d0f451b03d083c7ec80d3b4db1e649c425382b370d44c06c MD5 6f81353d272b5da2298de3bcd5c9ec2b baselayout-1.13.0_alpha11.ebuild 10489 RMD160 dff64cdaef3410614faf5ecc81f3fa6a2869bb1a baselayout-1.13.0_alpha11.ebuild 10489 SHA256 aa003f591b3f8d70d0f451b03d083c7ec80d3b4db1e649c425382b370d44c06c baselayout-1.13.0_alpha11.ebuild 10489 -MISC ChangeLog 88590 RMD160 36143db4693be5ba6ba20bc7dee476bbc2692ebd SHA1 0112c5d7d0d32879c48d3f20790cf1d02158dc15 SHA256 28e367a82095e0ed282865c61fb535ffa0297348942772ce2182920bf42eccba -MD5 3afd1d318e04125a10a4155841f07e89 ChangeLog 88590 -RMD160 36143db4693be5ba6ba20bc7dee476bbc2692ebd ChangeLog 88590 -SHA256 28e367a82095e0ed282865c61fb535ffa0297348942772ce2182920bf42eccba ChangeLog 88590 +MISC ChangeLog 88839 RMD160 7d04d5114f10222d50f4f7825a6bebeb0d8babc2 SHA1 f9712ee0b4b98c8bb203e001c9481922752359e1 SHA256 ea39555602d701cc3650e198dd1ef8e2550180a941328a3c1c1f9380d0f32a4d +MD5 02885b860db91aa26b84a26b6aba5ad1 ChangeLog 88839 +RMD160 7d04d5114f10222d50f4f7825a6bebeb0d8babc2 ChangeLog 88839 +SHA256 ea39555602d701cc3650e198dd1ef8e2550180a941328a3c1c1f9380d0f32a4d ChangeLog 88839 MISC metadata.xml 164 RMD160 f43cbec30b7074319087c9acffdb9354b17b0db3 SHA1 9c213f5803676c56439df3716be07d6692588856 SHA256 f5f2891f2a4791cd31350bb2bb572131ad7235cd0eeb124c9912c187ac10ce92 MD5 9a09f8d531c582e78977dbfd96edc1f2 metadata.xml 164 RMD160 f43cbec30b7074319087c9acffdb9354b17b0db3 metadata.xml 164 @@ -180,3 +188,6 @@ SHA256 2aff7adae59490722f3880d409166e61514c4dd90043c810f172776627f80505 files/di MD5 4a006d4e3be6f90b2c3c79f1776b1aea files/digest-baselayout-1.13.0_alpha11 280 RMD160 98dea4cb5f5b9ead0e0f9b3499a62bf5d60d9bdd files/digest-baselayout-1.13.0_alpha11 280 SHA256 43fd9d1cfeacfd464916cb9011db751d238122f899172a0cc69a56bc8ccabca8 files/digest-baselayout-1.13.0_alpha11 280 +MD5 4a006d4e3be6f90b2c3c79f1776b1aea files/digest-baselayout-1.13.0_alpha11-r1 280 +RMD160 98dea4cb5f5b9ead0e0f9b3499a62bf5d60d9bdd files/digest-baselayout-1.13.0_alpha11-r1 280 +SHA256 43fd9d1cfeacfd464916cb9011db751d238122f899172a0cc69a56bc8ccabca8 files/digest-baselayout-1.13.0_alpha11-r1 280 diff --git a/sys-apps/baselayout/baselayout-1.13.0_alpha11-r1.ebuild b/sys-apps/baselayout/baselayout-1.13.0_alpha11-r1.ebuild new file mode 100644 index 000000000000..6ef186aaeaea --- /dev/null +++ b/sys-apps/baselayout/baselayout-1.13.0_alpha11-r1.ebuild @@ -0,0 +1,296 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/baselayout/baselayout-1.13.0_alpha11-r1.ebuild,v 1.1 2007/01/10 23:46:56 uberlord Exp $ + +inherit flag-o-matic eutils toolchain-funcs multilib + +DESCRIPTION="Filesystem baselayout and init scripts" +HOMEPAGE="http://www.gentoo.org/" +SRC_URI="mirror://gentoo/${P}.tar.bz2 + http://dev.gentoo.org/~uberlord/baselayout/${P}.tar.bz2 + http://dev.gentoo.org/~azarah/baselayout/${P}.tar.bz2 + http://dev.gentoo.org/~vapier/dist/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd" +IUSE="bootstrap build pam static unicode kernel_linux kernel_FreeBSD" + +# This version of baselayout needs awk in /bin, but as we do not have +# a c++ compiler during bootstrap, we cannot depend on it if "bootstrap" +# or "build" are in USE. +RDEPEND="virtual/init + !build? ( + !bootstrap? ( + >=sys-libs/readline-5.0-r1 + >=app-shells/bash-3.2_p3-r1 + kernel_linux? ( >=sys-apps/coreutils-5.2.1 ) + kernel_FreeBSD? ( sys-process/fuser-bsd ) + ) + ) + pam? ( virtual/pam ) + ! "${IMAGE}/etc/conf.d/$1" + fi +} + +pkg_preinst() { + # Move our makefiles to a temporay location + mv "${D}"/usr/share/baselayout/{Makefile,default.mk,runlevels}* "${T}" + + # We need to install directories and maybe some dev nodes when building + # stages, but they cannot be in CONTENTS. + # Also, we cannot reference $S as binpkg will break so we do this. + if use build || use bootstrap ; then + local libdirs="$(get_all_libdirs)" dir= + # Create our multilib dirs - the Makefile has no knowledge of this + : ${libdirs:=lib} # it isn't that we don't trust multilib.eclass... + for dir in ${libdirs}; do + mkdir -p "${ROOT}${dir}" + touch "${ROOT}${dir}"/.keep + mkdir -p "${ROOT}usr/${dir}" + touch "${ROOT}usr/${dir}"/.keep + mkdir -p "${ROOT}usr/local/${dir}" + touch "${ROOT}usr/local/${dir}"/.keep + done + + # Ugly compatibility with stupid ebuilds and old profiles symlinks + if [[ ${SYMLINK_LIB} == "yes" ]] ; then + rm -r "${ROOT}"/{lib,usr/lib,usr/local/lib} &> /dev/null + local lib=$(get_abi_LIBDIR ${DEFAULT_ABI}) + ln -s "${lib}" "${ROOT}lib" + ln -s "${lib}" "${ROOT}usr/lib" + ln -s "${lib}" "${ROOT}usr/local/lib" + fi + + make -C "${T}" $(make_opts) DESTDIR="${ROOT}" layout || die "failed to layout filesystem" + fi + + # Change some vars introduced in baselayout-1.11.0 before we go stable + # The new names make more sense and allow nis_domain + # for use in baselayout-1.12.0 + remap_dns_vars net + remap_dns_vars wireless +} + +src_install() { + make $(make_opts) DESTDIR="${D}" install + dodoc ChangeLog COPYRIGHT + + # Should this belong in another ebuild? Like say binutils? + # List all the multilib libdirs in /etc/env/04multilib (only if they're + # actually different from the normal + if has_multilib_profile || [[ $(get_libdir) != "lib" || -n ${CONF_MULTILIBDIR} ]]; then + local libdirs="$(get_all_libdirs)" libdirs_env= dir= + : ${libdirs:=lib} # it isn't that we don't trust multilib.eclass... + for dir in ${libdirs}; do + libdirs_env=${libdirs_env:+$libdirs_env:}/${dir}:/usr/${dir}:/usr/local/${dir} + done + + # Special-case uglyness... For people updating from lib32 -> lib amd64 + # profiles, keep lib32 in the search path while it's around + if has_multilib_profile && [[ -d ${ROOT}lib32 || -d ${ROOT}lib32 ]] && ! hasq lib32 ${libdirs}; then + libdirs_env="${libdirs_env}:/lib32:/usr/lib32:/usr/local/lib32" + fi + echo "LDPATH=\"${libdirs_env}\"" > "${T}"/04multilib + doenvd "${T}"/04multilib + fi + + # rc-scripts version for testing of features that *should* be present + echo "Gentoo Base System version ${PV}" > "${D}"/etc/gentoo-release + + # Remove the installed runlevels, as we don't know about $ROOT yet + rm -rf "${D}/etc/runlevels" + + # Copy the make files to /usr/share/baselayout so we can re-use them in + # postinst, otherwise binpkg will break. + insinto /usr/share/baselayout + doins -r Makefile default.mk runlevels* +} + +pkg_postinst() { + # Make our runlevels if they don't exist + if [[ ! -e ${ROOT}etc/runlevels ]] ; then + einfo "Making default runlevels" + make -C "${T}" $(make_opts) DESTDIR="${ROOT}" runlevels_install >/dev/null + fi + + # We installed some files to /usr/share/baselayout instead of /etc to stop + # (1) overwriting the user's settings + # (2) screwing things up when attempting to merge files + # (3) accidentally packaging up personal files with quickpkg + # If they don't exist then we install them + for x in master.passwd passwd shadow group fstab ; do + [[ -e "${ROOT}etc/${x}" ]] && continue + [[ -e "${ROOT}usr/share/baselayout/${x}" ]] || continue + cp -p "${ROOT}usr/share/baselayout/${x}" ${ROOT}etc + done + + # We need to copy svcdir if upgrading + if has_version "/dev/null + rm -rf "${ROOT}${svcdir}" + ) + # Install our new init script and mark it started + if use kernel_linux ; then + ln -snf ../../init.d/volumes "${ROOT}"etc/runlevels/boot + ln -snf /etc/init.d/volumes "${ROOT}"lib/rcscripts/init.d/started + fi + fi + + if [[ ${ROOT} == / ]] && ! use build && ! use bootstrap; then + /sbin/depscan.sh --update >/dev/null + fi + + # This is also written in src_install (so it's in CONTENTS), but + # write it here so that the new version is immediately in the file + # (without waiting for the user to do etc-update) + rm -f "${ROOT}"/etc/._cfg????_gentoo-release + echo "Gentoo Base System version ${PV}" > "${ROOT}"/etc/gentoo-release + + echo + einfo "Please be sure to update all pending '._cfg*' files in /etc," + einfo "else things might break at your next reboot! You can use 'etc-update'" + einfo "to accomplish this:" + einfo + einfo " # etc-update" + + local lo="net.lo0" + use kernel_linux && lo="net.lo" + for f in ${ROOT}etc/init.d/net.*; do + [[ -L ${f} || ${f} == "${ROOT}etc/init.d/${lo}" ]] && continue + echo + einfo "WARNING: You have older net.* files in ${ROOT}etc/init.d/" + einfo "They need to be converted to symlinks to ${lo}. If you haven't" + einfo "made personal changes to those files, you can update with the" + einfo "following command:" + einfo + einfo " /bin/ls ${ROOT}etc/init.d/net.* | grep -v '/${lo}$' | xargs -n1 ln -sfvn ${lo}" + break + done + + if sed -e 's/#.*//' "${ROOT}"etc/conf.d/{net,wireless} 2>/dev/null \ + | egrep -q '\<(domain|nameservers|searchdomains)_' ; then + echo + ewarn "You have depreciated variables in ${ROOT}etc/conf.d/net" + ewarn "or ${ROOT}etc/conf.d/wireless" + ewarn + ewarn "domain_* -> dns_domain_*" + ewarn "nameservers_* -> dns_servers_*" + ewarn "searchdomains_* -> dns_search_domains_*" + ewarn + ewarn "They have been converted for you - ensure that you" + ewarn "update them via 'etc-update'" + fi + + if sed -e 's/#.*//' "${ROOT}"etc/conf.d/net 2>/dev/null \ + | egrep -q '\<(ifconfig|aliases|broadcasts|netmasks|inet6|ipaddr|iproute)_'; then + echo + ewarn "You are using deprecated variables in ${ROOT}etc/conf.d/net" + ewarn + ewarn "You are advised to review the new configuration variables as" + ewarn "found in ${ROOT}etc/conf.d/net.example as there is no" + ewarn "guarantee that they will work in future versions." + fi + + # Remove old stuff that may cause problems. + if [[ -e "${ROOT}"/etc/env.d/01hostname ]] ; then + rm -f "${ROOT}"/etc/env.d/01hostname + fi + if [[ -e "${ROOT}"/etc/init.d/domainname ]] ; then + rm -f "${ROOT}"/etc/{conf.d,init.d}/domainname \ + "${ROOT}"/etc/runlevels/*/domainname + echo + ewarn "The domainname init script has been removed in this version." + ewarn "Consult ${ROOT}etc/conf.d/net.example for details about how" + ewarn "to apply dns/nis information to the loopback interface." + fi + + echo + einfo "baselayout-1.13 and higher have dropped the RC_STRICT_NET_CHECKING" + einfo "variable from /etc/conf.d/rc. ${lo} now provides \"net\" and so does" + einfo "each net script linked to it." + einfo "The net dependency is now satisfied by any net.* scripts in the default" + einfo "runlevel, otherwise it's the last net.* script running which includes" + einfo "${lo}. So if you need to restart a net script that is listed in the" + einfo "runlevel you are in and not restart anything that needs it then you" + einfo "will need to use the --nodeps command line option." +} + +# Handle our downgraders +# We should remove this when <1.13 has been removed from the tree +pkg_postrm() { + # Remove dir if downgrading + if has_version "/dev/null + rm -rf "${ROOT}lib/rcscripts/init.d" + ) + fi +} diff --git a/sys-apps/baselayout/files/baselayout-1.13.0_alpha11-r2484.patch b/sys-apps/baselayout/files/baselayout-1.13.0_alpha11-r2484.patch new file mode 100644 index 000000000000..10e1c8091f81 --- /dev/null +++ b/sys-apps/baselayout/files/baselayout-1.13.0_alpha11-r2484.patch @@ -0,0 +1,408 @@ +Index: src/start-stop-daemon.c +=================================================================== +--- src/start-stop-daemon.c (revision 2481) ++++ src/start-stop-daemon.c (working copy) +@@ -795,7 +795,7 @@ + check(pid); + fclose(f); + } else if (errno != ENOENT || (stop != 0 && anykilled == 0)) +- errx(2, "open pidfile %s: %s", name, strerror(errno)); ++ errx(exitnodo, "open pidfile %s: %s", name, strerror(errno)); + + } + +Index: sbin/runscript.sh +=================================================================== +--- sbin/runscript.sh (revision 2481) ++++ sbin/runscript.sh (working copy) +@@ -7,7 +7,7 @@ + if [[ $1 == "/"* ]] ; then + myscript="$1" + else +- myscript="$(pwd)/$1" ++ myscript="${PWD}/$1" + fi + cd / + +@@ -113,24 +113,22 @@ + conf=$(add_suffix /etc/rc.conf) + [[ -e ${conf} ]] && . "${conf}" + +-mylevel="${SOFTLEVEL}" +-[[ ${SOFTLEVEL} == "${BOOTLEVEL}" \ +- || ${SOFTLEVEL} == "reboot" || ${SOFTLEVEL} == "shutdown" ]] \ +- && mylevel="${DEFAULTLEVEL}" +- + svc_quit() { + eerror $"ERROR:" " ${SVCNAME}" $"caught an interrupt" + eflush +- svc_in_control || exit 1 ++ svc_in_control ++ local in_control=$? + rm -rf "${svcdir}/snapshot/$$" "${svcdir}/exclusive/${SVCNAME}.$$" +- if service_wasinactive "${SVCNAME}" ; then +- mark_service_inactive "${SVCNAME}" +- elif [[ ${svcstarted} == "0" ]] ; then +- mark_service_started "${SVCNAME}" +- else +- mark_service_stopped "${SVCNAME}" ++ if [[ ${in_control} == 0 ]] ; then ++ if service_wasinactive "${SVCNAME}" ; then ++ mark_service_inactive "${SVCNAME}" ++ elif [[ ${svcstarted} == "0" ]] ; then ++ mark_service_started "${SVCNAME}" ++ else ++ mark_service_stopped "${SVCNAME}" ++ fi ++ end_service "${SVCNAME}" + fi +- end_service "${SVCNAME}" + exit 1 + } + +@@ -277,30 +275,30 @@ + fi + service_list=( "${service_list[@]}" "${x}" ) + done +- fi + +- for x in "${service_list[@]}" ; do +- local retry=3 +- while [[ ${retry} -gt 0 ]] ; do +- service_stopped "${x}" && break +- wait_service "${x}" +- ((retry--)) ++ for x in "${service_list[@]}" ; do ++ local retry=3 ++ while [[ ${retry} -gt 0 ]] ; do ++ service_stopped "${x}" && break ++ wait_service "${x}" ++ ((retry--)) ++ done ++ if ! service_stopped "${x}" ; then ++ eerror $"ERROR:" $"cannot stop" "${SVCNAME}" $"as" "${x}" $"is still up." ++ retval=1 ++ break ++ fi + done +- if ! service_stopped "${x}" ; then +- eerror $"ERROR:" $"cannot stop" "${SVCNAME}" $"as" "${x}" $"is still up." +- retval=1 +- break +- fi +- done + +- # Work with uses, before and after deps too, but as they are not needed +- # we cannot explicitly stop them. +- # We use -needsme with -usesme so we get the full dep list. +- # We use --notrace with -ibefore to stop circular deps. +- for x in $(rc-depend -needsme -usesme "${SVCNAME}") \ +- $(rc-depend --notrace -ibefore "${SVCNAME}"); do +- service_stopping "${x}" && wait_service "${x}" +- done ++ # Work with uses, before and after deps too, but as they are not needed ++ # we cannot explicitly stop them. ++ # We use -needsme with -usesme so we get the full dep list. ++ # We use --notrace with -ibefore to stop circular deps. ++ for x in $(rc-depend -needsme -usesme "${SVCNAME}") \ ++ $(rc-depend --notrace -ibefore "${SVCNAME}"); do ++ service_stopping "${x}" && wait_service "${x}" ++ done ++ fi + + IN_BACKGROUND="${ib_save}" + +@@ -317,7 +315,7 @@ + } + stop + ) +- retval="$?" ++ retval=$? + + # Don't trust init scripts to reset indentation properly + # Needed for ebuffer +@@ -339,15 +337,18 @@ + is_runlevel_stop && mark_service_failed "${SVCNAME}" + + # If we are halting the system, do it as cleanly as possible +- if [[ ${SOFTLEVEL} == "reboot" || ${SOFTLEVEL} == "shutdown" ]] ; then +- mark_service_stopped "${SVCNAME}" +- else +- if svc_wasinactive "${SVCNAME}" ; then +- mark_service_inactive "${SVCNAME}" +- else +- mark_service_started "${SVCNAME}" +- fi +- fi ++ case ${SOFTLEVEL} in ++ reboot|shutdown|single) ++ mark_service_stopped "${SVCNAME}" ++ ;; ++ *) ++ if service_wasinactive "${SVCNAME}" ; then ++ mark_service_inactive "${SVCNAME}" ++ else ++ mark_service_started "${SVCNAME}" ++ fi ++ ;; ++ esac + + eerror $"ERROR:" " ${SVCNAME}" $"failed to stop" + else +@@ -381,18 +382,18 @@ + ewarn $"WARNING:" " ${SVCNAME}" $"has already been started." + return 0 + elif service_inactive "${SVCNAME}" ; then +- aminactive=0 + if [[ ${IN_BACKGROUND} != "true" \ + && ${IN_BACKGROUND} != "1" ]] ; then + ewarn $"WARNING:" " ${SVCNAME}" $"has already been started." + return 0 + fi +- elif [[ ${SOFTLEVEL} == "shutdown" || ${SOFTLEVEL} == "reboot" ]] ; then +- ewarn $"WARNING: system shutting down, will not start" "${SVCNAME}" +- return 1 +- elif [[ ${SOFTLEVEL} == "single" ]] ; then +- eerror $"ERROR: system is in single user mode, will not start" "${SVCNAME}" +- return 1 ++ else ++ case ${SOFTLEVEL} in ++ reboot|shutdown|single) ++ ewarn $"WARNING: system shutting down, will not start" "${SVCNAME}" ++ return 1 ++ ;; ++ esac + fi + + if ! mark_service_starting "${SVCNAME}" ; then +@@ -457,7 +458,10 @@ + continue 2 + fi + service_stopped "${x}" && break +- ++ ++ # Small pause before trying again as it should be starting ++ # if we get here ++ sleep 1 + ((timeout--)) + done + +@@ -494,7 +498,7 @@ + + start + ) +- retval="$?" ++ retval=$? + + # Don't trust init scripts to reset indentation properly + # Needed for ebuffer +@@ -545,18 +549,17 @@ + } + + svc_restart() { +- if [[ ${SOFTLEVEL} == "shutdown" || ${SOFTLEVEL} == "reboot" ]] ; then +- ewarn $"WARNING: system shutting down, will not restart" "${SVCNAME}" +- return 1 +- elif [[ ${SOFTLEVEL} == "single" ]] ; then +- eerror $"ERROR: system is in single user mode, will not restart" "${SVCNAME}" +- return 1 +- fi ++ case ${SOFTLEVEL} in ++ reboot|shutdown|single) ++ ewarn $"WARNING: system shutting down, will not restart" "${SVCNAME}" ++ return 1 ++ ;; ++ esac + + # Create a snapshot of started services + rm -rf "${svcdir}/snapshot/$$" + mkdir -p "${svcdir}/snapshot/$$" +- cp -pP "${svcdir}"/started/* "${svcdir}"/inactive/* \ ++ cp -pPR "${svcdir}"/started/* "${svcdir}"/inactive/* \ + "${svcdir}/snapshot/$$/" 2>/dev/null + rm -f "${svcdir}/snapshot/$$/${SVCNAME}" + +@@ -690,7 +693,7 @@ + exit 1 + fi + for arg in "$@" ; do +- case "${arg}" in ++ case ${arg} in + --quiet) + RC_QUIET="yes" + RC_QUIET_STDOUT="yes" +@@ -710,7 +713,7 @@ + + retval=0 + for arg in "$@" ; do +- case "${arg}" in ++ case ${arg} in + stop) + if [[ -e "${svcdir}/scheduled/${SVCNAME}" ]] ; then + rm -Rf "${svcdir}/scheduled/${SVCNAME}" +@@ -721,13 +724,13 @@ + if [[ ${IN_BACKGROUND} == "true" || ${IN_BACKGROUND} == "1" ]] ; then + rm -rf "${svcdir}/snapshot/$$" + mkdir -p "${svcdir}/snapshot/$$" +- cp -pP "${svcdir}"/started/* "${svcdir}"/inactive/* \ ++ cp -pPR "${svcdir}"/started/* "${svcdir}"/inactive/* \ + "${svcdir}/snapshot/$$/" 2>/dev/null + rm -f "${svcdir}/snapshot/$$/${SVCNAME}" + fi + + svc_stop +- retval="$?" ++ retval=$? + + if [[ ${IN_BACKGROUND} == "true" || ${IN_BACKGROUND} == "1" ]] ; then + for x in $(dolisting "${svcdir}/snapshot/$$/") ; do +@@ -746,7 +749,7 @@ + ;; + start) + svc_start +- retval="$?" ++ retval=$? + service_started "${SVCNAME}" && svc_start_scheduled + ;; + needsme|ineed|usesme|iuse|broken|iafter|iprovide) +@@ -762,18 +765,18 @@ + ;; + restart) + svc_restart +- retval="$?" ++ retval=$? + ;; + condrestart|conditionalrestart) + if service_started "${SVCNAME}" ; then + svc_restart + fi +- retval="$?" ++ retval=$? + ;; + pause) + svcpause="yes" + svc_stop +- retval="$?" ++ retval=$? + svcpause="no" + ;; + --quiet|--nocolor|--nocolour|--nodeps|--verbose|--debug) +@@ -788,11 +791,11 @@ + *) + # Allow for homegrown functions + svc_homegrown ${arg} +- retval="$?" ++ retval=$? + ;; + esac + done + +-exit "${retval}" ++exit ${retval} + + # vim: set ts=4 : +Index: sbin/depscan.sh +=================================================================== +--- sbin/depscan.sh (revision 2481) ++++ sbin/depscan.sh (working copy) +@@ -22,7 +22,7 @@ + Options: + -d, --debug Turn on debug output + -s, --svcdir Specify svcdir (default: ${svcdir}) +- -u, --update Force update even if mtimes are OK ++ -f, --force Force update even if mtimes are OK + -v, --verbose Show which files are being touched to fix future mtimes + -h, --help Show this help cruft + EOF +@@ -33,8 +33,8 @@ + } + + mysvcdir=${svcdir} +-update=false +-nupdate=false ++force=false ++force_net=false + + while [[ -n $1 ]] ; do + case "$1" in +@@ -49,9 +49,9 @@ + mysvcdir="$1" + fi + ;; +- --update|-u) +- update=true +- nupdate=true ++ --force|-f) ++ force=true ++ force_net=true + ;; + --verbose|-v) + RC_VERBOSE="yes" +@@ -95,19 +95,19 @@ + # This makes is_older_than fix future mtimes + RC_FIX_FUTURE=${RC_FIX_FUTURE:-yes} + +-[[ -e "${mysvcdir}/deptree" ]] || update=true +-if ! ${update} ; then ++[[ -e "${mysvcdir}/deptree" ]] || force=true ++if ! ${force} ; then + is_older_than "${mysvcdir}/depcache" /etc/conf.d /etc/init.d \ +- /etc/rc.conf && update=true +- if ${!update} ; then ++ /etc/rc.conf && force=true ++ if ${!force} ; then + if ! bash -n "${mysvcdir}/deptree" ; then + eerror "${mysvcdir}/deptree is not valid - recreating it" +- update=true ++ force=true + fi + fi + fi + +-if ${update} ; then ++if ${force} ; then + ebegin "Caching service dependencies" + + # Clean out the non volatile directories ... +@@ -139,17 +139,17 @@ + [[ ${retval} != "0" ]] && exit ${retval} + fi + +-[[ -e "${mysvcdir}/netdeptree" ]] || nupdate=true +-if ! ${nupdate} ; then +- is_older_than "${mysvcdir}/netdepcache" "${svclib}"/net && nupdate=true +- if ${!nupdate} ; then ++[[ -e "${mysvcdir}/netdeptree" ]] || force_net=true ++if ! ${force_net} ; then ++ is_older_than "${mysvcdir}/netdepcache" "${svclib}"/net && force_net=true ++ if ${!force_net} ; then + if ! bash -n "${mysvcdir}/netdeptree" ; then + eerror "${mysvcdir}/netdeptree is not valid - recreating it" +- nupdate=true ++ force_net=true + fi + fi + fi +-if ${nupdate} ; then ++if ${force_net} ; then + ebegin "Caching network dependencies" + retval=0 + +Index: sh/rc-daemon.sh +=================================================================== +--- sh/rc-daemon.sh (revision 2481) ++++ sh/rc-daemon.sh (working copy) +@@ -155,10 +155,10 @@ + # If we are successful, then we clean up the pidfile if the daemon didn't. + rc_stop_daemon() { + local retryargs= +- [[ -z ${retry} && ${RC_wAIT_ON_STOP:-5} -gt 0 ]] \ +- && retryargs="--retry ${signal:--TERM}/${RC_WAIT_ON_STOP:-5}" ++ [[ -z ${retry} && ${RC_WAIT_ON_STOP} -gt 0 ]] \ ++ && retryargs="--retry ${signal:--TERM}/${RC_WAIT_ON_STOP}" + +- eval /sbin/start-stop-daemon ${retryargs} "${args}" ++ eval /sbin/start-stop-daemon --oknodo ${retryargs} "${args}" + local retval=$? + [[ ${retval} != 0 ]] && return ${retval} + diff --git a/sys-apps/baselayout/files/digest-baselayout-1.13.0_alpha11-r1 b/sys-apps/baselayout/files/digest-baselayout-1.13.0_alpha11-r1 new file mode 100644 index 000000000000..ee4883377111 --- /dev/null +++ b/sys-apps/baselayout/files/digest-baselayout-1.13.0_alpha11-r1 @@ -0,0 +1,3 @@ +MD5 20f8050a0fc52c6857a14bb627da1405 baselayout-1.13.0_alpha11.tar.bz2 229777 +RMD160 4b34817bff86699077304a17e118e060e078615d baselayout-1.13.0_alpha11.tar.bz2 229777 +SHA256 993ca18543d74f33e9b6d570d4f5ecdb40940e34e2b5fd97bcdc31321a87a1c6 baselayout-1.13.0_alpha11.tar.bz2 229777 -- 2.26.2