[ Date Index ][
Thread Index ]
[ <= Previous by date /
thread ]
[ Next by date /
thread => ]
Hi
Using suse 9.1
I am trying to write a script to mount my camera which is usb, I can access
this using mount /dev/sda1 /media/camera
this doing ls -l /media/camera. shows the directory listings fine
my script is as follows
#!/bin/sh
echo "camera mounting and copy routine"
#root check
if [ "$UID" -ne 0 ]
then
echo "YOU ARE NOT RUNNING AS ROOT"
exit 1
else
echo "$(date) you are running as root, mounting and copying files"
echo
fi
mount /dev/sda1 /media/camera
ls -l /media/camera
cp /media/camera/*.* /home/pausut/camera/
ls -l /home/pausut/camera
echo
echo done
exit 1
I get the following error message, I don't understand the bit about cannot
stat
mount: /dev/sda1 is not a valid block device
total 0
cp: cannot stat `/media/camera/*.*': No such file or directory
total 0
the first part of this tells me it's not mounted, but I can cd to the camera
fine.
My mtab file is here,
/dev/hda7 / reiserfs rw 0 0
proc /proc proc rw 0 0
tmpfs /dev/shm tmpfs rw 0 0
devpts /dev/pts devpts rw,mode=0620,gid=5 0 0
/dev/hda1 /windows/C vfat
rw,noexec,nosuid,nodev,gid=100,umask=0002,iocharset=iso8859-1,codepage=437 0
0
/dev/hda5 /windows/D vfat
rw,noexec,nosuid,nodev,gid=100,umask=0002,iocharset=iso8859-1,codepage=437 0
0
/dev/hdd /media/cdrecorder subfs ro,nosuid,nodev,fs=cdfss,procuid 0 0
/dev/hdc /media/cdrom subfs ro,nosuid,nodev,fs=cdfss,procuid 0 0
/dev/hdc /media/dvd subfs ro,nosuid,nodev,fs=cdfss,procuid 0 0
/dev/fd0 /media/floppy subfs rw,nosuid,nodev,sync,fs=floppyfss,procuid 0 0
usbdevfs /proc/bus/usb usbdevfs rw 0 0
/dev/sda1 /media/camera vfat rw 0 0
However this is edited as it also contained the line
/dev/sdb1 /media/usb-storage-Y172^^^^^000919X0000002003117:0:0:0p1
this was before the last line, however this caused the camera to be auto
mounted, but also not accessable
Could not enter
folder /media/usb-storage-Y172^^^^^000919X0000002003117:0:0:0p1
I am running bash, is it ok to use /bin/sh, i have not had problems with
this before, removing
What have I done wrong, I think there is a problem with auto mounting, why is
the mount point so long, usb-storage etc etc.
whats going wrong. and how do i stop it mounting the camera where it does,
and just have it mount on /dev/sda1 /media/camera. which is much easier. it
worked fine with suse 9.0
Thanks
paul
--
The Mailing List for the Devon & Cornwall LUG
Mail majordomo@xxxxxxxxxxxx with "unsubscribe list" in the
message body to unsubscribe.