How do I mount device without displaying file-list?

Core libraries and systems
Message
Author
B.K. Johnson
Posts: 807
Joined: Mon 12 Oct 2009, 17:11

#21 Post by B.K. Johnson »

Hello all
This is rather long, but stay with me.
Takeaways:

/etc/init.d is where scripts invoking services to be run at startup are placed.
/root/Startup is where user scripts to be executed at bootup after X has loaded are placed.
In some puppies*, viz Precise 571, Lucid 5287, and Racy 5.5 (Walsh) and Tahr-6.0.6 (BKJ), when a script/symlink calls for accessing a storage device it can be done using /etc/init.d without any other changes i.e. mount point not needed.
In upupbb, a /etc/init.d script/symlink that requires accessing a storage device does not work.
In upupbb, a /Startup script/symlink that requires accessing a storage device works ONLY if the script sets a mount point.
autostart, a replacement for Startup, has been available for use since 2006. It is used minimally in upupbb but seemingly not at all by the community.


* This is not the result of analyzing all puppies.

Sometimes you keep doing something and after a while you think the idea was your own. :lol: Though I have used the Startup directory for actions I want at startup, I make no such claim of ownership. My latest use is to mount storage devices at startup to avoid ROX-Filer cluttering my desktop. Go here to read the scenario.
On that thread, Burn_IT and Mike Walsh provided the solution, but Mike placed the symlink to his script in /etc/init.d. Accustomed as I am to using Startup for that purpose, I overlooked Mike's placement when I read the post and then Mike, bigpup, I and others got sidetracked on Chooser and File Managers. I forgot completely about my original question until yesterday, almost a year after the initial post.

Two issues ensued. First, when I placed this script in /root/my-applicationa/bin and symlinked to Startup, it didn't work in upupbb (32 bit). UUIDs redacted.

Code: Select all

#!/bin/sh
#
#Name: roxlessmount
#
#Auto mount my 2 normally installed drives at boot - sda1 and sdc1.
#With emelfm2 being my file manager, I can now access the drives
#immediately after booting without first invoking ROX, to clutter my
#desktop with its file-list display.
#
mount UUID=XXXXXXXXXXXXXXXX /mnt/sda1
mount UUID=XXXXXXXXX /mnt/sdc1
.
After much head-scratching and DuckDuckGo search, I guessed that I needed to create a mount point. Modifying the script as below then worked.

Code: Select all

#!/bin/sh
#
#Name: roxlessmount
#
#Auto mount my 2 normally installed drives at boot - sda1 and sdc1.
#With emelfm2 being my file manager, I can now access the drives
#immediately after booting without first invoking ROX, to clutter my
#desktop with its file-list display.
#
mkdir /mnt/sda1
mount UUID=XXXXXXXXXXXXXXXX /mnt/sda1
mkdir /mnt/sdc1
mount UUID=XXXXXXXXX /mnt/sdc1
That's what drew me back to the thread: to see if Mike had likewise set up a mount point but I had missed it. He had not.

The README files did not help in this regard, but it raises the question of the proper placement of scripts with startup actions.

README in /etc/init.d
The scripts in /etc/init.d are executed at bootup and shutdown to start and stop services.
- emphasis is mine. a specific set of named services; not user scripts

README in Startup
Any executable or scripts (or symlink to) placed in this directory
will be executed after the X desktop has loaded. For example, say that you wanted to run /usr/local/bin/rubix (a game) everytime Puppy is started. ...
Note, if you want to execute something at bootup and prior to X desktop
loading, edit /etc/rc.d/rc.local.
Mike's code that succeeded did not have mount point(s). I tried linking my script with and without the mount point to /etc/init.d from tahr-6.0.6. In both instances it worked. On my experimental upupbb, roxlessmount without mount points set, and symlinked to /etc/init.d, the drives were not marked as mounted when the system booted. As shown in the console extract below, the script exists and is executable, but when invoked, we get a mount point does not exist error.

Code: Select all

# which roxlessmount
/root/my-applications/bin/roxlessmount
# roxlessmount
ntfs-3g-mount: failed to access mountpoint /mnt/sda1: No such file or directory
mount-FULL: /mnt/sdc1: mount point does not exist.
# 
I got the exact error when symlinked to Startup.

So, in tahr-6.0.6 and the puppies that Mike use (Precise 571, Lucid 5287, and Racy 5.5), a symlink to /etc/init.d works without a mount point, but not in upupbb.

Strange things do happen.
.
In this layman's opinion, the proper location to link scripts like mine which are not services, is in the Startup directory, even if using /etc/init.d works. I will continue to use Startup.
[Later]
Help is on the way.
Barry recently wrote:
I know that woof-CE has gone over to /etc/xdg/autostart and $HOME/.config/autostart, as per the xdg specification.
And this is what $HOME/.config/autostart README in upupbb states:
This is a new directory for starting applications when X starts
It is to be populated by .desktop files only, anything else is to be ignored.
This is part of the deprecation of /root/Startup
For guidelines on autostart and creating .desktop files see :
http://standards.freedesktop.org/autost ... atest.html
Edited 11/11/2019 for addition of Takeaways.
[color=blue]B.K. Johnson
tahrpup-6.0.5 PAE (upgraded from 6.0 =>6.0.2=>6.0.3=>6.0.5 via quickpet/PPM=Not installed); slacko-5.7 occasionally. Frugal install, pupsave file, multi OS flashdrive, FAT32 , SYSLINUX boot, CPU-Dual E2140, 4GB RAM[/color]

Post Reply