You are not logged in.
bashmount 1.6.0 released now with support for blacklisting, following a request from GSF1200S.
Please do let me know if it doesn't work as expected, or if you notice any other bugs.
Last edited by jnguyen (2011-11-23 10:12:08)
TOMOYO Linux: Mandatory Access Control.
My AUR packages
Offline
Thank you so much for this sweet application. It's something I always thought would be nice to have but never wrote.
I have an android device which I tested this with.
My small enhancement contribution from it:
Once the device is connected to the computer info_has_media() returns 0.
When, on the device, I select "Connect storage to PC" (to make it accessible), info_has_media() returns 1.
However, obviously, when info_has_media() returns 0 mounting fails. It would be a nice to have an indication of this.
Maybe add something like
info_has_media="$(info_has_media "${devname}")"
if (( info_has_media == 1 )); then
printf '%s' "Has media"
else
printf '%s' "No media"
fi
in removable_devices()
Or maybe make the entry bold? That's up to you.
Last edited by MadCatMk2 (2011-11-23 11:17:16)
Offline
Hi MadCatMk2, thanks very much for your feedback.
I too have an Android device. I'll have a think about it adding some kind of indication when I get more time.
TOMOYO Linux: Mandatory Access Control.
My AUR packages
Offline
bashmount 1.6.1 released with a small bug fix and some code cleanup.
Development has moved to GitHub.
In the future, bashmount will use udisks2, which will at some point supersede udisks (Fedora 17).
@MadCatMk2: I decided against applying your changes, as the user should know to click "Connect storage to PC" on their Android. I also feel the current feedback is sufficient:
Mount failed: Error mounting: mount: no medium found on /dev/sdd
Thanks very much for taking the time to provide some feedback though.
Last edited by jnguyen (2012-02-05 22:59:56)
TOMOYO Linux: Mandatory Access Control.
My AUR packages
Offline
In the future, bashmount will use udisks2, which will at some point supersede udisks (Fedora 17).
Would this be much effort to implement? udisks2 changed where disks are mounted to /run/media/USER/LABEL, which was a minor PITA (changing symlinks and configuration files, etc). All the commands have changed, and the documentation is poor.
/media was so much simpler, especially for those of us who don't use a graphical file manager.
EDIT:Just reading through the code to bashmount, and I think there's only a handful of lines that would need to be changed to switch to udisks2. The only one which looks to be difficult to implement is the --enumerate-device-files as there's no direct (shorthand) equivalent in udisks2, though the information could probably be parsed out of `udisksctl dump`
Last edited by zoqaeski (2012-07-02 02:15:07)
Offline
jnguyen wrote:In the future, bashmount will use udisks2, which will at some point supersede udisks (Fedora 17).
Would this be much effort to implement? udisks2 changed where disks are mounted to /run/media/USER/LABEL, which was a minor PITA (changing symlinks and configuration files, etc). All the commands have changed, and the documentation is poor.
/media was so much simpler, especially for those of us who don't use a graphical file manager.
EDIT:Just reading through the code to bashmount, and I think there's only a handful of lines that would need to be changed to switch to udisks2. The only one which looks to be difficult to implement is the --enumerate-device-files as there's no direct (shorthand) equivalent in udisks2, though the information could probably be parsed out of `udisksctl dump`
Hi, sorry for the late reply. I will be working on this when I have time, so likely not before October. Watch this space!
TOMOYO Linux: Mandatory Access Control.
My AUR packages
Offline
Hi,
recently i did a rewrite of bashmount that does not depend on udisks.
You can find it on github.
It uses lsblk instead of udisks for gathering information and runs subjectively faster.
Devices are sorted by internal media, removable media and optical media.
For mounting devices different backends like udevil,udisks,/usr/bin/mount,... can be used.
You can find a list of differences between bashmount 2.0.0alpha1 and the forked version here.
By the way, i also got rid of the fancy sort function and other hacks ;-)
Offline
Very nice, following the project
Offline
By the way, i also got rid of the fancy sort function and other hacks ;-)
What exactly does replacing printf with echo achieve?
Offline
What exactly does replacing printf with echo achieve?
I have used echo out of habit, and the code is easier to read, but according to this the change should probably reverted.
Offline
Awebb wrote:What exactly does replacing printf with echo achieve?
I have used echo out of habit, and the code is easier to read, but according to this the change should probably reverted.
I only asked because you explicitly mention it on your changes page, so I thought this might be a big deal for some reason and wanted to know why. I use printf out of habit, since it's not unique to bash.
Offline
Hi,
recently i did a rewrite of bashmount that does not depend on udisks.
Hi! I'm the original bashmount author (I lost my previous bbs login). Really cool changes. I'd love to see some pull requests
Offline
Many thanks to teateawhy (aka Lukas B.) for the awesome port to lsblk, and various other improvements worthy of a bump to 3.0.0.
https://sourceforge.net/projects/bashmount/
bashmount 3.0.0beta2 (2014-03-23)
- Fix newline in UI
bashmount 3.0.0beta1 (2014-03-23)
- Autodetect the presence of udisksctl, but also allow to manually disable
the use of udisks
- Re-order the configuration file and remove redundant options
- Allow blacklisting by TYPE
- The first three custom commands are now built-in to bashmount, so only
custom4_command, custom5_command and custom6_command are configurable
- Remove show_device_path option, and instead always show the device path
bashmount 3.0.0alpha1 (2014-03-23)
Many thanks to Lukas B. (aka https://github.com/vitamins) for porting
bashmount to use lsblk where appropriate and a variety of other changes:
- Information retrieval is now based on `lsblk` instead of `udisksctl`,
which allows us to get rid of a lot of horrible parsing
- Devices are sorted by internal media, removable media and optical media
- Only partitions are listed, no disks
- Opened luks containers are also listed by default
Configuration file:
- Add "mount_command" and "unmount_command" which can be configured by the
user
- "optical_devices" and "removable_devices" are no longer present
- "show_internal" is set to '1' by default
- "show_removable_device_filename" and "show_optical_device_filename" have
been replaced by a single variable named "show_device_path"
- "fancy_sort" is no longer present
Offline
Et voilà, bashmount-3.0.0 is available for your enjoyment :-)
https://sourceforge.net/projects/bashmount/
bashmount 3.0.0 (2014-03-23)
- Allow pressing [enter] to refresh device list
Last edited by jamielinux (2014-03-23 13:17:47)
Offline
Hello Jamielinux,
Bashmount is great but I get one little issue (that may come from me). I have a mp3 player with an internal memory and an mini sd-card.
The sd-card is shown in the list of device and can be mounted. That's not the case for the internal memory. If I use for example udevil, then the internal memory is shown and mounted.
Would you need some outputs to see if there is an little issue in bashmount ?
Thanks again for your work !
Offline
Bashmount is great but I get one little issue (that may come from me). I have a mp3 player with an internal memory and an mini sd-card.
The sd-card is shown in the list of device and can be mounted. That's not the case for the internal memory. If I use for example udevil, then the internal memory is shown and mounted.
Would you need some outputs to see if there is an little issue in bashmount ?
bashmount uses `lsblk` to find devices.
What is the location of the internal memory in /dev/ ?
Can you post the output of
lsblk -plno NAME
and
lsblk -a -plno NAME
and see if your device is listed?
Offline
I guess that the internal memory is in /dev/sdc.
You can see the output of lsblk -plno NAME here : http://pastebin.com/F6xNG2r3
and the output of lsblk -a -plno NAME there : http://pastebin.com/9kMEbB2r
I also posted a screenshot of bashmount here : http://imagebin.org/303734
I hope it helps !
Offline
I guess that the internal memory is in /dev/sdc.
You can see the output of lsblk -plno NAME here [...]
The device sdc does not contain a partition. Bashmount only displays partitions, not devices, that means /dev/sdc is not displayed.
You need to create a partition and a filesystem on the device.
Offline
Not keen on formatting back my mp3 player. Too bad that they are no workaround to show device in bashmount ?
Offline
Why haven't I tested this earlier?! Really well done, it even supports luks encryption *happy*. I'll look into your code, maybe I'll be able to finally finish my dmenu script for mounting and umounting devices. Until then I use bashmount!
Offline
Not keen on formatting back my mp3 player. Too bad that they are no workaround to show device in bashmount ?
Fixed in bashmount 3.1.0
Last edited by jamielinux (2014-04-04 18:27:05)
Offline
Works great with 3.1.1 !
Thanks a lot jamielinux !
Offline