/[vps]/baselayout-vserver/trunk/sbin/rc
Gentoo

Diff of /baselayout-vserver/trunk/sbin/rc

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 14 Revision 15
2# Copyright 1999-2005 Gentoo Foundation 2# Copyright 1999-2005 Gentoo Foundation
3# Distributed under the terms of the GNU General Public License v2 3# Distributed under the terms of the GNU General Public License v2
4 4
5trap ":" INT QUIT TSTP 5trap ":" INT QUIT TSTP
6source /sbin/functions.sh 6source /sbin/functions.sh
7# Only source this when this is a livecd booting ...
8[ -f /sbin/livecd-functions.sh ] && source /sbin/livecd-functions.sh
9umask 022 7umask 022
10 8
11try() { 9try() {
12 local errstr 10 local errstr
13 local retval=0 11 local retval=0
229 eend $? 227 eend $?
230 228
231 # Read off the kernel commandline to see if there's any special settings 229 # Read off the kernel commandline to see if there's any special settings
232 # especially check to see if we need to set the CDBOOT environment variable 230 # especially check to see if we need to set the CDBOOT environment variable
233 # Note: /proc MUST be mounted 231 # Note: /proc MUST be mounted
234 [ -f /sbin/livecd-functions.sh ] && livecd_read_commandline
235
236 if [ "$(get_KV)" -ge "$(KV_to_int '2.6.0')" ] ; then 232 if [ "$(get_KV)" -ge "$(KV_to_int '2.6.0')" ] ; then
237 if [[ -d /sys ]] ; then 233 if [[ -d /sys ]] ; then
238 ebegin "Mounting sysfs at /sys" 234 ebegin "Mounting sysfs at /sys"
239 if [[ ${RC_USE_FSTAB} = "yes" ]] ; then 235 if [[ ${RC_USE_FSTAB} = "yes" ]] ; then
240 mntcmd=$(get_mount_fstab /sys) 236 mntcmd=$(get_mount_fstab /sys)
563 ;; 559 ;;
564 esac 560 esac
565 eend 0 561 eend 0
566 fi 562 fi
567 563
568 # If booting off CD, we want to update inittab before setting the runlevel
569 if [ -f "/sbin/livecd-functions.sh" -a -n "${CDBOOT}" ]
570 then
571 ebegin "Updating inittab"
572 livecd_fix_inittab
573 eend $?
574 /sbin/telinit q &>/dev/null
575 fi
576
577 # Clear $svcdir from stale entries, but leave the caches around, as it 564 # Clear $svcdir from stale entries, but leave the caches around, as it
578 # should help speed things up a bit 565 # should help speed things up a bit
579 rm -rf $(ls -d1 "${svcdir}/"* 2>/dev/null | \ 566 rm -rf $(ls -d1 "${svcdir}/"* 2>/dev/null | \
580 grep -ve '\(depcache\|deptree\|envcache\)') 567 grep -ve '\(depcache\|deptree\|envcache\)')
581 568

Legend:
Removed from v.14  
changed lines
  Added in v.15

  ViewVC Help
Powered by ViewVC 1.1.20