#!/bin/bash # $Header: /home/cvsd/magellan-cvs/magellan-src/magellan-initscripts/etc/rc.d/init.d/mountfslivecd,v 1.4 2005-07-03 21:32:18 niro Exp $ #%rlevels: 7:s 0:k 6:k #%start: 40 #%stop: 60 #deps #%needs: #%before: #%after: source /etc/sysconfig/rc source $rc_functions case "$1" in start) echo -e ${COLOREDSTAR}"Recording existing mounts in /etc/mtab ..." > /etc/mtab # fake mounts rootfs (taken from /.bootdev) if [ -e /.bootdev ] then source /.bootdev mount -f ${BOOTDEV} /mnt/cdrom -t ${FSTYPE} -o ro # we don't delete this for the alx settings import # wanna check if usbstorage or not # rm /.bootdev fi # fake mounts cloop, loop or sqsh if [ -f /mnt/cdrom/livecdrootfs.loop ] then mount -f /mnt/cdrom/livecdrootfs.loop /mnt/cloop -t ext2 -o ro elif [ -f /mnt/cdrom/livecdrootfs.cloop ] then mount -f /mnt/cdrom/livecdrootfs.cloop /mnt/cloop -t ext2 -o ro elif [ -f /mnt/cdrom/livecdrootfs.sqsh ] then mount -f /mnt/cdrom/livecdrootfs.sqsh /mnt/cloop -t ext2 -o ro fi # records devfs as mounted if is_fs_mounted devfs then mount -f -t devfs devfs /dev fi # records devpts as mounted if is_fs_mounted devpts then mount -f -t devpts devpts /dev/pts fi # records sysfs as mounted if is_fs_mounted sysfs then mount -f -t sysfs sysfs /sys fi # records udev as mounted if is_fs_mounted udev then mount -f -t ramfs udev /dev fi # fake mounts tmpfs mount -f tmpfs / -t tmpfs -o rw # fake mounts proc mount -f proc /proc -t proc -o rw evaluate_retval update_svcstatus $1 splash svc_started "$(basename $0)" 0 ;; stop) echo -e ${COLOREDSTAR}"Unmounting all other currently mounted file systems ..." #umount /dev #umount /proc #umount / #umount -a -r evaluate_retval update_svcstatus $1 splash svc_stopped "$(basename $0)" 0 ;; *) echo "Usage: $0 {start|stop}" exit 1 ;; esac