Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 15 Dec 1997 12:34:24 +0100 (MET)
From:      Johan Larsson <gozer@ludd.luth.se>
To:        FreeBSD Current <freebsd-current@FreeBSD.ORG>
Subject:   mount_cd9660 panics.
Message-ID:  <Pine.SUN.3.95.971215122642.1162B-100000@brother.ludd.luth.se>

next in thread | raw e-mail | index | archive | help
I don't know if this is related to current only. But i'll start here.

Whenever i try to use this script to mount the cdrom and the cdrom is
empty or contains a noniso cd the kernel panics. I have taken it from
slackware linux and modified it a bit to work under freebsd, it has worked
for quite a while, but a month ago or something like that it started
panicing. Now i always use mount /cdrom to mount it, but should it really
panic???

#!/bin/sh -
# /etc/rc.cdrom
#

MOUNTPOINT="/cdrom"
unset SKIP
if mount | fgrep "on $MOUNTPOINT " 1> /dev/null 2> /dev/null ; then
  SKIP=1
elif [ ! -d $MOUNTPOINT ]; then
  SKIP=1
fi
if [ ! "$SKIP" = "1" ]; then
  unset MOUNT
  echo ""
  echo -n "Checking for a CD... "
  for device in wcd0c scd0c mcd0c ; do # check for a CD-ROM drive with a
disc in
 it.
    if mount_cd9660 /dev/$device $MOUNTPOINT 1> /dev/null 2> /dev/null ;
then
      MOUNT=1
      rm -f /dev/cdrom
      ln -sf /dev/$device /dev/cdrom
      break;
    fi
  done
  if [ "$MOUNT" = "1" ]; then # mount successful
    echo "found on /dev/$device."
    echo "    Mounting unknown ISO9660 CD-ROM under $MOUNTPOINT."
  else
    echo "no CD found."
  fi
fi

	Johan
-- 
  * mailto:gozer@ludd.luth.se * http://www.ludd.luth.se/users/gozer/ *
  * Powered by FreeBSD. http://www.se.freebsd.org/ +-+-+-+-+-+-+-+-+ *




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.SUN.3.95.971215122642.1162B-100000>