/[baselayout]/trunk/sbin/rc
Gentoo

Diff of /trunk/sbin/rc

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

Revision 794 Revision 795
152 echo 152 echo
153 153
154 check_statedir /proc 154 check_statedir /proc
155 155
156 ebegin "Mounting proc at /proc" 156 ebegin "Mounting proc at /proc"
157 if [[ ${RC_USE_FSTAB} = "yes" ]] ; then
157 mntcmd=$( get_mount_fstab /proc ) 158 mntcmd=$(get_mount_fstab /proc)
159 else
160 unset mntcmd
161 fi
158 mntcmd=${mntcmd:--t proc none /proc} 162 try mount -n ${mntcmd:--t proc none /proc}
159 try mount -n ${mntcmd}
160 eend $? 163 eend $?
161 164
162 # Read off the kernel commandline to see if there's any special settings 165 # Read off the kernel commandline to see if there's any special settings
163 # especially check to see if we need to set the CDBOOT environment variable 166 # especially check to see if we need to set the CDBOOT environment variable
164 # Note: /proc MUST be mounted 167 # Note: /proc MUST be mounted
165 [ -f /sbin/livecd-functions.sh ] && livecd_read_commandline 168 [ -f /sbin/livecd-functions.sh ] && livecd_read_commandline
166 169
167 if [ "$(get_KV)" -ge "$(KV_to_int '2.6.0')" ] 170 if [ "$(get_KV)" -ge "$(KV_to_int '2.6.0')" ] ; then
168 then
169 if [ -d /sys ] 171 if [[ -d /sys ]] ; then
170 then
171 ebegin "Mounting sysfs at /sys" 172 ebegin "Mounting sysfs at /sys"
173 if [[ ${RC_USE_FSTAB} = "yes" ]] ; then
172 mntcmd=$( get_mount_fstab /sys ) 174 mntcmd=$(get_mount_fstab /sys)
175 else
176 unset mntcmd
177 fi
173 mntcmd=${mntcmd:--t sysfs none /sys} 178 try mount -n ${mntcmd:--t sysfs none /sys}
174 try mount -n ${mntcmd}
175 eend $? 179 eend $?
176 else 180 else
177 ewarn "No /sys to mount sysfs needed in 2.6 and later kernels!" 181 ewarn "No /sys to mount sysfs needed in 2.6 and later kernels!"
178 fi 182 fi
179 fi 183 fi
236 devfs="no" 240 devfs="no"
237 fi 241 fi
238 fi 242 fi
239 243
240 # Actually start setting up /dev now 244 # Actually start setting up /dev now
241 if [ "${udev}" = "yes" ] 245 if [[ ${udev} = "yes" ]] ; then
242 then
243 # Setup temporary storage for /dev 246 # Setup temporary storage for /dev
244 ebegin "Mounting /dev for udev" 247 ebegin "Mounting /dev for udev"
248 if [[ ${RC_USE_FSTAB} = "yes" ]] ; then
245 mntcmd=$( get_mount_fstab /dev ) 249 mntcmd=$(get_mount_fstab /dev)
250 else
251 unset mntcmd
252 fi
246 if [ -n "${mntcmd}" ] 253 if [[ -n ${mntcmd} ]] ; then
247 then
248 try mount -n ${mntcmd} 254 try mount -n ${mntcmd}
249 else 255 else
250 if egrep -qs tmpfs /proc/filesystems ; then 256 if egrep -qs tmpfs /proc/filesystems ; then
251 try mount -n -t tmpfs none /dev 257 try mount -n -t tmpfs none /dev
252 else 258 else
347 # Make sure we have /dev/pts 353 # Make sure we have /dev/pts
348 mkdir -p /dev/pts &>/dev/null || \ 354 mkdir -p /dev/pts &>/dev/null || \
349 ewarn "Could not create /dev/pts!" 355 ewarn "Could not create /dev/pts!"
350 fi 356 fi
351 357
352 if [ -d /dev/pts ] 358 if [[ -d /dev/pts ]] ; then
353 then
354 ebegin "Mounting devpts at /dev/pts" 359 ebegin "Mounting devpts at /dev/pts"
360 if [[ ${RC_USE_FSTAB} = "yes" ]] ; then
355 mntcmd=$( get_mount_fstab /dev/pts ) 361 mntcmd=$(get_mount_fstab /dev/pts)
362 else
363 unset mntcmd
364 fi
356 mntcmd=${mntcmd:--t devpts -o gid=5,mode=0620 none /dev/pts} 365 try mount -n ${mntcmd:--t devpts -o gid=5,mode=0620 none /dev/pts}
357 try mount -n ${mntcmd}
358 eend $? 366 eend $?
359 fi 367 fi
360 fi 368 fi
361 fi 369 fi
362 370

Legend:
Removed from v.794  
changed lines
  Added in v.795

  ViewVC Help
Powered by ViewVC 1.1.20