On Wed, Sep 15, 2010 at 09:48:14AM -0400, William Yang wrote:
> > http://blogs.sun.com/danielc/entry/a_usb_drive_daemon_for1
> >
> > That seems more userfriendly, but we still have to try it. Is this
> > still the best way to do it?
>
> Yes, in my opinion.
Dear all,
I have tried the usbdrived script and have come along the following
issues.
I have spent several hours today in debugging that. These are my observations:
* when plugging in a 'normal' usb stick utdiskadm mounts it correctly
* when plugging in a scandisk usb stick it seems 3 disk, where only 2
have good partitions. Only one partition (with the scandisk
software) is mounted
I tried to use the script I found on the sun blog (usbdrived) and
installed it for a single user. Some more observations:
a) It installed in my .profile a line that uses utaction to start the
usbdrived. However. Uppon loggin in it starts the usbdrived and it
is running. However that script makes use of $SUN_SUNRAY_TOKEN.
Swithing to debug mode in the script it shows that that shell variable
is empty! And thus it never really starts the script (first two lines
of the start() function). But when I then on the sunray open a
terminal and look at my environment I see that the variable is **not**
empty. I don't understand why it is empty in the first case...
Anyway, I commented out that part of the script so it continues.
b) For some reasing when started from the .profile again, utdiskadm -l
doesn't return anything! it gives an error that it can't find root
(sorry don't remember exactly, it is already 10 hours ago!)
c) Then there is a logical error in the script! It has:
#We have found a device to check on
ls -l ${USBLINKDIR}/* 2>/dev/null | grep `basename $DISK`
The problem with the grep is that it doesn't take into account the
scandisk usb flash disk has several partitions where the mount point
will have very similar names! In my case the sandisk is mounted under:
/tmp/SUNWut/...user//mnt/unamed
/tmp/SUNWut/...user//mnt/unamed_0
As you can see with the above names the grep (that is in a for loop)
always finds something if it searches for unnamed.
I was able to fix that error by changing the script to
ls -l ${USBLINKDIR}/* 2>/dev/null | grep `basename $DISK`$
So it matches to the end of the line.
So in the end I don't really have a easy solution:
1) the usbdrived script doesn't work when I start it from the .profile
because some variables are not set.
2) utdiskadm -l doesn't work too, except when I call it 'manually'
from an active shell'
3) usbdrived count's on the sunray software to correctly mount my
partions, which it doesn't anyway! I can mount it manually though!
But that is not user friendly
4) I have the logical error in the script, but that was easily fixed.
Many thanks for reading so far! Any help would be well appreciated!
Rudy
_______________________________________________
SunRay-Users mailing list
[email protected]
http://www.filibeto.org/mailman/listinfo/sunray-users