Hi jazzbiker
... I've did in such a way in order to avoid "sudo" in .profile (mount will need it). ...
When the system boots, it adds every partition that it finds to /etc/fstab. If it is listed in fstab, you don't need sudo
to mount it.
... 2. Has the use of "sudo" in user scripts some negative connotation? ...
Not as far as I'm concerned. Sometimes a command needs elevated privileges but the rest of the script does not.
... 3. BB's "read" builtin has the -u option, oooeee! Where from can I got this other than from BB sources? ...
Possibly the BB config file. I used this man page for possible options for the read command:
https://linuxcommand.org/lc3_man_pages/readh.htmland then verify that BB read accepts them.
... What are the benefits of this technique over dumb ...
I was having a syntax problem with the "dumb" version and did not feel like fighting with it.
... Where have You bought them??
I made it up. I used one of the UUIDs my system recognized (DRIVES file), added an arbitrary path and link name. Since
I wasn't executing the actual commands, the directory path didn't need to exist. I just needed to verify the commands
being echoed were correct.
Place the script in ~/.local/bin. That way it's persistent and included in $PATH.
Call the script from ~/.X.d/ or ~/.profile so that $HOME has been set when the script gets called.
Change this:
# List of External Storage Devices. <UUID> <Target dir name> <Link name>
ESDs=".ExternalDrives"
so it points to your file of persistent external drives.
At this point, just enter the script name in a terminal:
hybridhome.sh
See if the commands it echos out look correct. If they do, change the lines with echo so the commands actually
get executed.