Modify

Opened 9 years ago

Closed 7 years ago

Last modified 4 years ago

#5139 closed enhancement (obsolete)

enhanced usb automount script

Reported by: mijs Owned by: developers
Priority: normal Milestone: Barrier Breaker 14.07
Component: base system Version: Trunk
Keywords: usb automount Cc:

Description

changeset 14289 introduced new script for auto-mounting usb drives located in /etc/hotplug.d/block/10-mount;

Changes below will remove the created mountpoints when:

  • disk is removed
  • mount fails

line 12:

mount /dev/$device /mnt/$device

change to:

mount /dev/$device /mnt/$device || rmdir /mnt/$device

line 15:

umount /dev/$device

change to:

if [ -d /mnt/$device ]; then
  umount /dev/$device && rmdir /mnt/$device
fi

Attachments (0)

Change History (4)

comment:1 Changed 9 years ago by KanjiMonster

I like the Idea, but it has one small catch: when the root is located on a flash, every mount/unmount would result in one or more writes to the flash.

comment:2 Changed 9 years ago by mijs

I get your concerns;

What is the above change is combined with the following:

file /etc/init.d/boot

insert@line 41 (before mkdir -p /var/run):

mkdir /tmp/mnt
mount /tmp/mnt /mnt

This would prevent any changes written to flash when inserting/removing usd drives?

comment:3 Changed 7 years ago by nbd

  • Resolution set to obsolete
  • Status changed from new to closed

comment:4 Changed 4 years ago by jow

  • Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07

Milestone Attitude Adjustment 12.09 deleted

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.