OESF Portables Forum

Model Specific Forums => Sharp Zaurus => Zaurus - pdaXrom => Topic started by: louigi600 on December 29, 2006, 05:57:51 pm

Title: Automount Mounts Even What It Should Not
Post by: louigi600 on December 29, 2006, 05:57:51 pm
I hadto digg quite a little before finding what mounted it automatically.
I made a very small change to /etc/udev/scripts/mount.sh that would avoid mounting automatically entries that have noauto option in fstab.
If anyone is intrested here is the diff (unfortunately indentation has gone to hell) :

*** /etc/udev/scripts/mount.sh  1970-01-01 00:00:00.000000000 +0000
--- scripts/mount.sh    2006-08-11 15:32:30.000000000 +0000
***************
*** 61,67 ****
 
  if [ "$ACTION" = "add" ] && [ -n "$DEVNAME" ]; then
      if grep "^$DEVNAME" /etc/fstab >/dev/null ; then
!       mount $DEVNAME
        exit 0
      fi
      get_mount_dir
--- 61,67 ----
 
  if [ "$ACTION" = "add" ] && [ -n "$DEVNAME" ]; then
      if grep "^$DEVNAME" /etc/fstab >/dev/null ; then
!       [ $(grep -v noauto /etc/fstab |grep -c "^$DEVNAME") -ge 1 ] && mount $DEVNAME
        exit 0
      fi
      get_mount_dir