#------------------------------------------------------------------------------ # /etc/rc.d/rc030.mount - mount data-partition and cdrom # # Creation: 24.09.2003 hs # Last Update: $Id$ #------------------------------------------------------------------------------ case $OPT_MOUNT in yes) begin_script MOUNT "mounting other partitions ..." # find data-partition created with opt_hdinstall typ a or b if [ "$hd_data" ] && grep -q "$hd_data" /proc/partitions then log_info "mounting data-partition..." echo "/dev/$hd_data /data ext3 defaults,noatime 0 1" >> /etc/fstab if [ -f /sbin/e2fsck ] then e2fsck -p "/dev/$hd_data" fi mkdir /data mount /data || log_error "can't mount data-partition" fi # find and mount first cdrom-drive if [ -f /proc/sys/dev/cdrom/info ] then log_info "mounting cd-rom..." n=1 first='yes' for drive in `sed -n 's/^drive name:[\t ]*//p' /proc/sys/dev/cdrom/info | sed 's/[[:space:]]\+/\n/g' | sort` do mkdir -p /cdrom$n echo "/dev/$drive /cdrom$n iso9660 ro 0 0" >> /etc/fstab dd if=/dev/$drive bs=2k count=1 of=/dev/null >/dev/null 2>&1 res=$? if [ $res -eq 0 ] then mount /cdrom$n || log_error "ERROR: can't mount cd-rom /dev/$drive" if [ "$first" == "yes" ] then ln -s /cdrom$n /cdrom first='no' fi # else # log_error "ERROR: no Media in Drive /dev/$drive" fi n=`expr $n + 1` done fi end_script ;; esac