The time now is Sun 19 May 2013, 05:11
All times are UTC - 4 |
|
Page 3 of 3 [35 Posts] |
Goto page: Previous 1, 2, 3 |
| Author |
Message |
Bruce B

Joined: 18 May 2005 Posts: 10817 Location: The Peoples Republic of California
|
Posted: Wed 22 Jun 2011, 08:37 Post subject:
|
|
Karl Godt,
Please tell me what you want. I ask, because I'm actually not sure.
Discuss for the sake of discussion technical discussion? Learn? Teach? Refute? Something else?
Bruce
~
_________________ New! Puppy Linux Links Page
|
|
Back to top
|
|
 |
Karl Godt

Joined: 20 Jun 2010 Posts: 2675 Location: Kiel,Germany
|
Posted: Fri 01 Jul 2011, 07:42 Post subject:
|
|
Finally I think I found the thread the OP mentioned , and I am astonished ,
that a sophisticated and experienced member started it :
Puppy's fstab + ntfs-3g = error
The thread ended unsolved ....
The unfortunately orphaned
Issue 19: fstab + ntfs-3g = error
pointed me to it .
This bug declaration mentioned this fstab issue also not working on
Puppy 430 and Puppy 431 , but on my full installations of
Macpup Foxy 3 based upon Puppy 430 and
Macpup Opera 2 based upon Puppy 431
the fstab works contrary to the bug submitter.
I also had put the statically ntfs-3g and mount-FULL from 511 into luci-254 and moved the ntfs-3g-libs in /usr/lib and /lib out of their directories
and must confirm , that for whatever cause ,
ntfs-3g gets passed the '-n' option there .
This is unbelieveable to me , though it seems ,
that while development woof DL libs that may create a linux environment , where some things do not work anymore as expected or usual .
I guess many have experienced , that while a script in the terminal works , it may not work with the same syntax in a script .
For anyone interested , this puzzled me in so far :
| Code: |
##echo 'Part -a begin'
if [[ "`echo "$@" | grep -w -E '\-[a-z]*a[a-z]*|\-a[a-z]*|\-[a-z]*a|\-a'`" != "" ]] ; then
### option -a given
##echo 'if #1'
if [ -n `readlink -f /etc/fstab` ] ; then
##echo 'if #2'
FSTAB=`cat $(readlink -f /etc/fstab) | grep '^/dev/' | grep -v 'noauto' | tr '\t' ' ' | tr -s ' '`
MOUNTDIRS=`echo "$FSTAB" | cut -f 2 -d ' '`
for i in $MOUNTDIRS ; do
[ ! -d $i ] && echo 'if #3' && mkdir -p $i
done
for i in $MOUNTDIRS ; do
DEVICE=`echo "$FSTAB" | grep "$i" | cut -f 1 -d ' '`
FSTYPE=`echo "$FSTAB" | grep "$i" | cut -f 3 -d ' '`
OPTION=`echo "$FSTAB" | grep "$i" | cut -f 4 -d ' '`
mount-FULL "$DEVICE" "$i" -t "$FSTYPE" -o "$OPTION"
done
else
echo -e "\\033[0;31m""Error , option '-a' given but fstab does not exists""\\033[0;39m"
exit
fi
else
##echo 'if #1 else'
#v2.12 discovered difference between $@ and $*. Replaced all $@ with $* in this script... |
|
|
Back to top
|
|
 |
Bruce B

Joined: 18 May 2005 Posts: 10817 Location: The Peoples Republic of California
|
Posted: Fri 01 Jul 2011, 11:23 Post subject:
|
|
| Karl Godt wrote: | I also had put the statically ntfs-3g and mount-FULL from 511 into luci-254 and moved the ntfs-3g-libs in /usr/lib and /lib out of their directories and must confirm , that for whatever cause ,
ntfs-3g gets passed the '-n' option there |
Right. I hope this means you concur there is a bug. I'm not going to debug it unless asked.
My interest is making sure the bug report stays open. If you agree, then we can find something else to argue about :)
~
_________________ New! Puppy Linux Links Page
|
|
Back to top
|
|
 |
Mmmm
Joined: 15 Jun 2010 Posts: 22
|
Posted: Thu 08 Dec 2011, 13:05 Post subject:
|
|
Here's a little script using mount-FULL as a workaround.
Using this means you don't need to replace your mount program with mount-FULL and so you don't lose your little mount indicators.
I put it on my desktop with the required arguments in the little argument box and away I went, you can use it for as many different drives as you like. (just use different arguments for each 'shortcut').
(I called it "MountByLabel-ntfs")
| Code: |
#!/bin/sh
#usage MountByLabel-ntfs [label] [mountpoint]
#eg. MountByLabel Whitey /mnt/whitey
change_icon()
{
#change desktop icons
echo "<?xml version=\"1.0\"?>
<env:Envelope xmlns:env=\"http://www.w3.org/2001/12/soap-envelope\">
<env:Body xmlns=\"http://rox.sourceforge.net/SOAP/ROX-Filer\">
<SetIcon>
<Path>$1</Path>
<Icon>$2</Icon>
</SetIcon>
</env:Body>
</env:Envelope>" | rox -R
}
label=$1
mntpt=$2
mounted=$(mount | grep $mntpt)
#if already mounted, unmount
if [ -n "$mounted" ]; then
umount $mntpt
if [ -z "$(mount | grep $mntpt)" ]; then
icon="/usr/local/lib/X11/pixmaps/usbdrv48.png"
rox -D $mntpt #close window
fi
#mount if not mounted
else
mount-FULL -t ntfs-3g -L $label $mntpt
rox -x $mntpt
if [ -n "$(mount | grep $mntpt)" ]; then
icon="/usr/local/lib/X11/pixmaps/usbdrv_mntd48.png"
rox $mntpt #display mounted drive root
fi
fi
device="$(mount | grep $mntpt | cut -c 6-9)" #get device
change_icon /root/.pup_event/drive_$device $icon
|
|
|
Back to top
|
|
 |
ldolse
Joined: 23 Oct 2009 Posts: 358
|
Posted: Tue 10 Apr 2012, 02:02 Post subject:
|
|
Sorry to revive a thread which seems to have gone quiet, but has this bug ever been solved upstream? (guessing not as I don't see an agreed upon solution here) I discovered this same issue with another user using mpdPup (built from a September woof snapshot) - I've got a wizard there which writes an entry to fstab, e.g.: | Code: | | /dev/sdb1 /mnt/music auto defaults 0 0 |
And that seems to work great for any drive type except ntfs, which failed for the exact reasons described in this thread. The other user was attempting to work around the problem and he tried a couple things. First he changed fstab to this: | Code: | | /dev/sda2 /mnt/music ntfs-3g rw 0 0 |
Which still failed. Finally he just edited the /bin/mount script and removed the -n option discussed in this thread. I think that his solution still requires ntfs-3g be used, but I need to do some testing on my own with an ntfs drive. Ideally I'd like a solution that allows 'auto' to be used in fstab if possible to keep my setup scripts simpler.
I was also wondering what the reason was for suppressing writes to mtab with the -n option - the man page mentions it's for dealing with a read only filesystem, but Puppy is always going to be read/write in some manner with any Pupmode, isn't it?
|
|
Back to top
|
|
 |
|
|
Page 3 of 3 [35 Posts] |
Goto page: Previous 1, 2, 3 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|