|
Lines 684-692
Link Here
|
| 684 |
# As we're in the bootlevel, add any services that failed due |
684 |
# As we're in the bootlevel, add any services that failed due |
| 685 |
# to /dev/.rcsysinit existing to the list |
685 |
# to /dev/.rcsysinit existing to the list |
| 686 |
if [[ -d /dev/.rcboot ]] ; then |
686 |
if [[ -d /dev/.rcboot ]] ; then |
|
|
687 |
COLDPLUG_SERVICES= |
| 687 |
for x in $(dolisting /dev/.rcboot/) ; do |
688 |
for x in $(dolisting /dev/.rcboot/) ; do |
| 688 |
[[ -L ${x} ]] && myscripts="${myscripts} ${x##*/}" |
689 |
[[ -L ${x} ]] && COLDPLUG_SERVICES="${COLDPLUG_SERVICES} ${x##*/}" |
| 689 |
done |
690 |
done |
|
|
691 |
for x in ${COLDPLUG_SERVICES} ; do |
| 692 |
if [[ ! -e /etc/runlevels/"${BOOTLEVEL}"/"${x}" \ |
| 693 |
&& ! -e /etc/runlevels/"${DEFAULTLEVEL}"/"${x}" ]] ; then |
| 694 |
myscripts="${myscripts} ${x}" |
| 695 |
mark_service_coldplugged "${x}" |
| 696 |
fi |
| 697 |
done |
| 690 |
einfo "Device initiated services:${HILITE}${myscripts}${NORMAL}" |
698 |
einfo "Device initiated services:${HILITE}${myscripts}${NORMAL}" |
| 691 |
rm -rf /dev/.rcboot |
699 |
rm -rf /dev/.rcboot |
| 692 |
fi |
700 |
fi |
|
Lines 737-760
Link Here
|
| 737 |
service_stopped "${service}" && return 0 |
745 |
service_stopped "${service}" && return 0 |
| 738 |
|
746 |
|
| 739 |
# Candidate for zapping ? |
747 |
# Candidate for zapping ? |
| 740 |
[[ ! -L ${svcdir}/softscripts.new/${service} ]] || \ |
748 |
[[ -L ${svcdir}/softscripts.new/${service} ]] \ |
| 741 |
return 0 |
749 |
&& return 0 |
| 742 |
|
750 |
|
| 743 |
# If this is a 'net' service, we do not want to stop it if it was |
751 |
if [[ ${SOFTLEVEL} != "reboot" \ |
| 744 |
# not in the previous runlevel, and we are not shutting down, |
752 |
&& ${SOFTLEVEL} != "shutdown" \ |
| 745 |
# rebooting or going to single runlevel. This is because the user |
753 |
&& ${SOFTLEVEL} != "single" ]] ; then |
| 746 |
# (or hotplut) might have started it (net.ppp?) ... |
754 |
service_coldplugged "${service}" && return 0 |
| 747 |
if net_service "${service}" && \ |
755 |
[[ -z ${OLDSOFTLEVEL} ]] \ |
| 748 |
[[ ${SOFTLEVEL} != "reboot" && \ |
756 |
|| ! in_runlevel "${service}" "${OLDSOFTLEVEL}" \ |
| 749 |
${SOFTLEVEL} != "shutdown" && \ |
757 |
&& return 0 |
| 750 |
${SOFTLEVEL} != "single" ]] ; then |
|
|
| 751 |
if [[ -z ${OLDSOFTLEVEL} ]] || \ |
| 752 |
! in_runlevel "${service}" "${OLDSOFTLEVEL}" |
| 753 |
then |
| 754 |
# This service is not in the previous runlevel, so |
| 755 |
# do not stop it ... |
| 756 |
return 0 |
| 757 |
fi |
| 758 |
fi |
758 |
fi |
| 759 |
|
759 |
|
| 760 |
# Should not work for 'use' |
760 |
# Should not work for 'use' |