LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 10-19-2016, 04:43 AM   #16
drgibbon
Senior Member
 
Registered: Nov 2014
Distribution: Slackware64 15.0
Posts: 1,220

Rep: Reputation: 942Reputation: 942Reputation: 942Reputation: 942Reputation: 942Reputation: 942Reputation: 942Reputation: 942

Quote:
Originally Posted by SCerovec View Post
I get the impression You miss the spirit of my tool:
udevil is done "right way", all bells and whistles there, but hardly any acceleration?
Actually after trying it, I found that devmon (from udevil) is very fast. It works like this (docs here):

Code:
## devmon is the mounting daemon, running it interactive will generate debugging info
## for actual use it should be run in the background instead; devmon &
devmon
## if you like popup info you can use devmon --info-on-mount
Code:
## with the original devmon running, now plug in 
## the USB drive (or more) and it is auto-mounted 
## to /media

## to remove it (possibly alias this to something shorter)
devmon --unmount-recent # or devmon -c
## to remove all
devmon --unmount-removable # or devmon -r
## or a specific device
devmon --unmount DIR|DEVICE
## if someone was really cool they could write a zsh completion file for this :)

If there is an /etc/fstab entry for the device (which should really be using the UUID) then devmon will respect that and mount the device there. I'm not trying to put down your script here SCerovec, but just correcting the misconception that udevil is not fast/requires more typing.

Last edited by drgibbon; 10-19-2016 at 05:14 AM.
 
1 members found this post helpful.
Old 10-19-2016, 05:19 AM   #17
malekmustaq
Senior Member
 
Registered: Dec 2008
Location: root
Distribution: Slackware & BSD
Posts: 1,669

Rep: Reputation: 498Reputation: 498Reputation: 498Reputation: 498Reputation: 498
The option of drgibbon at ~/.mrc is philosophically sound under existing unix/linux practices, in fact even giant programs employ that policy, a slacker can do that manually anytime.

Although, to me personally my linux common-sense shall expect something like /etc/mrc --because, modesty aside, slackware practitioners unconsciously develop a peculiar common hive attitude what mother-bee at /etc tells to swarms of dumb binaries working unwittingly among processes.

The unspoken hesitance of the author SCerovec at choosing /etc/mrc instead of /etc/m/mrc bespeaks rather a reluctant but genuine "slackeresis" --a computing sickness that can develop in a user through constant use of Slackware, or a mental tendency to know the proper place for everything, due to slackware's sound implementation of what an operating system should be; often, this sickness can go worse seeing how your system is boringly stable fast and beautiful, though this chronic discomfort can get abated easily by a cup of coffee. !

Pardon my joke. I'm just getting bored of my Slackware 12 that never breaks for almost a decade now in spite hardwork. I may not say I am thankful to His Excellency Pat Volkerding, but certainly... I am deeply grateful .

Salud!

m.m.
 
1 members found this post helpful.
Old 10-19-2016, 05:48 AM   #18
SCerovec
Senior Member
 
Registered: Oct 2006
Location: Cp6uja
Distribution: Slackware on x86 and arm
Posts: 2,471

Original Poster
Blog Entries: 2

Rep: Reputation: 980Reputation: 980Reputation: 980Reputation: 980Reputation: 980Reputation: 980Reputation: 980Reputation: 980
Quote:
Originally Posted by drgibbon View Post
Actually after trying it, I found that devmon (from udevil) is very fast. It works like this (docs here):
I apologize sir.
I didn't state it clear:
no human is to measure up to computer processing a stream.
I meant acceleration by less typing.
I merely type m
and go on with business as usual.
That scratched my itch.
and by means of a simple script - no functionality added, no review time needed, just deploy and use away.
Quote:
Code:
## devmon is the mounting daemon, running it interactive will generate debugging info
## for actual use it should be run in the background instead; devmon &
devmon
## if you like popup info you can use devmon --info-on-mount
Code:
## with the original devmon running, now plug in 
## the USB drive (or more) and it is auto-mounted 
## to /media

## to remove it (possibly alias this to something shorter)
devmon --unmount-recent # or devmon -c
## to remove all
devmon --unmount-removable # or devmon -r
## or a specific device
devmon --unmount DIR|DEVICE
## if someone was really cool they could write a zsh completion file for this :)

If there is an /etc/fstab entry for the device (which should really be using the UUID) then devmon will respect that and mount the device there. I'm not trying to put down your script here SCerovec, but just correcting the misconception that udevil is not fast/requires more typing.
I don't underestimate udevil not a tiny bit. Moreover where it there when i had my issues re:[u[mount]], i've never come up with said m in the first place.

But now we have eduev in place:

Want me show You how this udevil is obsolete, or at least an overkill?

I could make eudev rules that do it all way up to the mount of the plugged-in storage.
Even have it fsck-ed if needs be done.

For umount: I could decide to have them mounted "sync", or have an action to warn in-front of an unplug.

Not to mention the message bus and it's inhuman .xml streams of obfuscations that can be tamed by means of wrappers and forced into obedience without X running.

My point:
whatever the out of box OS can do, do using least amount of additional cruft.

Heck, maybe there is a way to do m without a script even?

Aren't we Slackers all hackers or not? O.o

So, kindest thanks, dear mrgibbon, no offense taken nor any intended.

I merely reflect my personal opinion, however wrong, out of my personal experience, however limited and non aplicable to reality.

Also i highly value Your effort to bring forward the fact and possible other solutions. This is always welcome and should be encouraged among our community - otherwise we wouldn't have htop in the box yet, for instance.

here:
_
V <---have a medal for trying
*

me, I'll slack on with m and co. (...have more scripts in the chest )
 
Old 10-19-2016, 05:56 AM   #19
SCerovec
Senior Member
 
Registered: Oct 2006
Location: Cp6uja
Distribution: Slackware on x86 and arm
Posts: 2,471

Original Poster
Blog Entries: 2

Rep: Reputation: 980Reputation: 980Reputation: 980Reputation: 980Reputation: 980Reputation: 980Reputation: 980Reputation: 980
Thumbs up

Quote:
Originally Posted by malekmustaq View Post
The option of drgibbon at ~/.mrc is philosophically sound under existing unix/linux practices, in fact even giant programs employ that policy, a slacker can do that manually anytime.

Although, to me personally my linux common-sense shall expect something like /etc/mrc --because, modesty aside, slackware practitioners unconsciously develop a peculiar common hive attitude what mother-bee at /etc tells to swarms of dumb binaries working unwittingly among processes.

The unspoken hesitance of the author SCerovec at choosing /etc/mrc instead of /etc/m/mrc bespeaks rather a reluctant but genuine "slackeresis" --a computing sickness that can develop in a user through constant use of Slackware, or a mental tendency to know the proper place for everything, due to slackware's sound implementation of what an operating system should be; often, this sickness can go worse seeing how your system is boringly stable fast and beautiful, though this chronic discomfort can get abated easily by a cup of coffee. !

Pardon my joke. I'm just getting bored of my Slackware 12 that never breaks for almost a decade now in spite hardwork. I may not say I am thankful to His Excellency Pat Volkerding, but certainly... I am deeply grateful .

Salud!

m.m.
Well I could use one of following places:
Code:
/etc/m/<files>
~/.mrc
~/.config/m/<files>
~/.local/programs/share/m/<files>
/opt/etc/m/<files>
/usr/etc/m/<files>
/m/<files> #(heck why not, i'm a single letter litterer!)
But no thanks, i think i will explore more obscure (hackish) ways to run my m now,
and deploy it elsewhere...
i will report back
 
Old 10-19-2016, 06:06 AM   #20
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,897

Rep: Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019
Does no one else use autofs(5) automount(8) anymore?


Anyway, whether people like/use your script or not, Kudos for actually getting off your arse and creating something. It's more than many people ever do.
 
2 members found this post helpful.
Old 10-19-2016, 06:09 AM   #21
drgibbon
Senior Member
 
Registered: Nov 2014
Distribution: Slackware64 15.0
Posts: 1,220

Rep: Reputation: 942Reputation: 942Reputation: 942Reputation: 942Reputation: 942Reputation: 942Reputation: 942Reputation: 942
Quote:
Originally Posted by SCerovec View Post
I apologize sir.
I didn't state it clear:
no human is to measure up to computer processing a stream.
I meant acceleration by less typing.
I understand, and I write scripts to do various things too (which I think this is a great thing). But it is also true that you could use udevil with less effort than m at the moment (that includes typing and configuration). Mounting with devmon requires no typing and no prior mountpoint configuration (obviously devmon should load automatically with the environment), it makes use of any present fstab entries, and if you alias 'devmon --unmount-recent' to a single character, then you have a system that works across all removable devices and uses only 1 character. I just want to make sure that this is recognized, in case people read this thread and think that udevil "takes more typing work" when it really doesn't. But still, thanks for sharing your work, some might prefer your more straightforward approach.

Last edited by drgibbon; 10-19-2016 at 06:40 AM.
 
2 members found this post helpful.
Old 10-19-2016, 08:37 AM   #22
SCerovec
Senior Member
 
Registered: Oct 2006
Location: Cp6uja
Distribution: Slackware on x86 and arm
Posts: 2,471

Original Poster
Blog Entries: 2

Rep: Reputation: 980Reputation: 980Reputation: 980Reputation: 980Reputation: 980Reputation: 980Reputation: 980Reputation: 980
Quote:
Originally Posted by GazL View Post
Does no one else use autofs(5) automount(8) anymore?


Anyway, whether people like/use your script or not, Kudos for actually getting off your arse and creating something. It's more than many people ever do.
Apparently no? :/

Mah, at moments I feel like an keyboard monkey :0}

Quote:
Originally Posted by drgibbon View Post
I understand, and I write scripts to do various things too (which I think this is a great thing). But it is also true that you could use udevil with less effort than m at the moment (that includes typing and configuration). Mounting with devmon requires no typing and no prior mountpoint configuration (obviously devmon should load automatically with the environment), it makes use of any present fstab entries, and if you alias 'devmon --unmount-recent' to a single character, then you have a system that works across all removable devices and uses only 1 character. I just want to make sure that this is recognized, in case people read this thread and think that udevil "takes more typing work" when it really doesn't. But still, thanks for sharing your work, some might prefer your more straightforward approach.
I knew You would come out with that

Yes udevil is a nice add-on, and quite powerful and polished at the edges.
But it's developers didn't have the wits that "we the users" want just to type less, and not to know more.
So that alias comes as Your (excellent) add-on to an (IMHO) late_to_game "automount just got better" project.


IMO the "mount the latest device" should be an intrinsic property of an OS, not something that should be added to it?

As well as mount toggling by a simple (short?) command.
 
Old 10-19-2016, 09:00 AM   #23
drgibbon
Senior Member
 
Registered: Nov 2014
Distribution: Slackware64 15.0
Posts: 1,220

Rep: Reputation: 942Reputation: 942Reputation: 942Reputation: 942Reputation: 942Reputation: 942Reputation: 942Reputation: 942
I know I have been harping on about udevil, but some people have already expressed interest in your script, so it's already been appreciated at least by a few Your m is clearly a valid way of mounting stuff, I just think we should be informed about what other ways there might be before writing them off. Keep on hacking

Last edited by drgibbon; 10-19-2016 at 09:38 AM.
 
Old 10-19-2016, 01:18 PM   #24
SCerovec
Senior Member
 
Registered: Oct 2006
Location: Cp6uja
Distribution: Slackware on x86 and arm
Posts: 2,471

Original Poster
Blog Entries: 2

Rep: Reputation: 980Reputation: 980Reputation: 980Reputation: 980Reputation: 980Reputation: 980Reputation: 980Reputation: 980
Thumbs up

Relax, dude, it's Slackware:
We each have the same OS and each our own preferences, it's okay to recommend Your own preferences.
No harm in that.
And I think I even like Your way (non intrusive).
I hope You get it clear is, not to expect anyone accept the offered preferences;
That's the key:
Offer and leave be, as in freedom.

Other than that, one is simply doing it wrong

Oh, and I will (keep on hacking)

Quote:
Originally Posted by off topic
P.S.
speaking of which, ATM I'm waiting my 1TB drive to get converted: the play-load partition (~900GB (!)) is being (hopefully) converted from jfs to ext4 - in place - ETA ~5 days (!!)
program: fstransform (beta) =), platform Banana PI + regular SATA cables + "MOLEX PSU" + tiny mod
(replies please on new topic, no worry I will catch it )
 
Old 10-19-2016, 04:09 PM   #25
drgibbon
Senior Member
 
Registered: Nov 2014
Distribution: Slackware64 15.0
Posts: 1,220

Rep: Reputation: 942Reputation: 942Reputation: 942Reputation: 942Reputation: 942Reputation: 942Reputation: 942Reputation: 942
Sure, I only looked into it because of this thread though (and udevil was mentioned early on). More out of interest really (and possibly procrastination ;P). Actually everything I mount regularly is set up in scripts, and for the rest I am usually dealing with a graphical file manager (or zsh's awesome history substring search, which was stolen from fish I believe).
 
Old 10-20-2016, 06:50 AM   #26
SCerovec
Senior Member
 
Registered: Oct 2006
Location: Cp6uja
Distribution: Slackware on x86 and arm
Posts: 2,471

Original Poster
Blog Entries: 2

Rep: Reputation: 980Reputation: 980Reputation: 980Reputation: 980Reputation: 980Reputation: 980Reputation: 980Reputation: 980
learning zsh is on my (pretty long now) TODO list
 
Old 10-20-2016, 09:44 AM   #27
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
My 2 cents about this... (and I likely won't use it, not because it isn't useful, but because about the only time I use a thumbdrive, I am already in KDE and just use dolphin's popup to mount it -- so this is just my humble opinion from the outside looking in)

If you would like to have it be a Slackware package, you shouldn't put the binary in ~/bin/, nor should you have the primary config file be ~/.mrc, however, if you plan on having the user just download the script and save it locally (possibly editing their $PATH so ~/bin/ is included), then it would probably be best to just hardcode the config options at the top of the script and allow the user to either pass variables to the script or replace the default values themselves and not support an ~/.mrc file.

If you do want to provide a Slackware package, I feel /etc/mrc makes the most sense with the ability for users to override it by using ~/.mrc.

With you current /etc/rcm (I agree with malekmustaq that it should probably be renamed to mrc to prevent confusion with rc.M), I would also make the more likely edited entries be at the top. Namely, the device and mount point. I would put both of those before the color scheme, because it is less likely someone would edit the color scheme over the device and/or mount point. I would also remove the echo statement and the /bin/sh at the top, as config files generally shouldn't be scripts themselves, just sourced by the script.

As far as new features, it might be nice to support using UUIDs (and not by just using /dev/disk/by-uuid/, although, worst comes to worst, that is still an option), and possibly multiple mount locations based on the device. That would add complexity to the script, so I understand if you'd rather not get into that. I could just see it being beneficial for those who may plug in multiple devices or can have their device points changed (adding/removing a semi-active external harddrive and then trying to plug in a thumbdrive).

Overall, this is a great idea for those whose devices tend to be the same and either are in the CLI frequently or their preferred WM/DE doesn't support automounting (or the user prefers to have that disabled). I hope you don't take my suggestions as criticisms. They are just a few things I saw that might improve your script.
 
3 members found this post helpful.
Old 10-20-2016, 12:14 PM   #28
SCerovec
Senior Member
 
Registered: Oct 2006
Location: Cp6uja
Distribution: Slackware on x86 and arm
Posts: 2,471

Original Poster
Blog Entries: 2

Rep: Reputation: 980Reputation: 980Reputation: 980Reputation: 980Reputation: 980Reputation: 980Reputation: 980Reputation: 980
@bassmadrigal
all good points, all considered by me too.

I think I would not want it to be a Slackware package (too minor to matter?)

I think i rather make this and few others individual (per user) scripts.

for ~/bin/

and be just downloadable archives as such?

Key point is "easy" and "useful".

Once deployed on a typical Slackware, the home survives quite long (decades?) so why bother?

And my script, being what it is, is quite agnostic to both device management, naming conventions (hda -> sda -> mmc ...) architecture etc, so i can expect it could roll quite a while before becoming obsolete?

I think next release goes ~/bin/

And there will be a collection, as I plan to publish few more tiny utilities down the line.


Kindest thanks for the support.
 
  


Reply

Tags
cli, manage, mount, umount, user



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Browseable zip command line utility? linux.noob Linux - Software 3 02-26-2012 02:09 PM
Ubuntu Verve Command Line Utility metallica1973 Linux - General 3 01-13-2011 06:32 PM
command line setup utility sikkalgopal Mandriva 3 09-14-2004 12:41 PM
Where is Command line utility for Cups and command tutorial mossy Linux - Software 8 01-16-2004 12:24 AM
Command line utility costasm Linux - Software 1 10-24-2003 09:28 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 11:09 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration