summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoy Marples <uberlord@gentoo.org>2007-01-10 23:46:56 +0000
committerRoy Marples <uberlord@gentoo.org>2007-01-10 23:46:56 +0000
commit02534fca08b846bf987d5a94c86ef3b4d9a585be (patch)
tree63767dfc875133f47fabd1a18728425f7e31a925 /sys-apps/baselayout/files
parentprune old versions (diff)
downloadgentoo-2-02534fca08b846bf987d5a94c86ef3b4d9a585be.tar.gz
gentoo-2-02534fca08b846bf987d5a94c86ef3b4d9a585be.tar.bz2
gentoo-2-02534fca08b846bf987d5a94c86ef3b4d9a585be.zip
Fix some restart issues and unmount svcdir from 1.12 if needed.
(Portage version: 2.1.2_rc4-r7)
Diffstat (limited to 'sys-apps/baselayout/files')
-rw-r--r--sys-apps/baselayout/files/baselayout-1.13.0_alpha11-r2484.patch408
-rw-r--r--sys-apps/baselayout/files/digest-baselayout-1.13.0_alpha11-r13
2 files changed, 411 insertions, 0 deletions
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