The officially official Devuan Forum!

You are not logged in.

#1 Today 18:54:26

coder-hase
Member
Registered: 2025-08-11
Posts: 17  

umnt - Helper script to mount network drives.

I've uploaded umnt which is an awk script to mount network drives based on an fstab-like configuration file: <https://codeberg.org/awk-scripting/umnt>.  It does not use gvfs but mount (to make a late reply to https://dev1galaxy.org/viewtopic.php?id=7851).  Something like

<your-user> ALL=(ALL) NOPASSWD: /usr/bin/mount *
<your-user> ALL=(ALL) NOPASSWD: /usr/bin/umount *

in /etc/sudoers is recommended.  umnt supports smb, sftp and dav filesystems.  It's a kind of beta release but good enough for use.

Now the (perhaps) interesting point: umnt does not do the mount itself.  Instead, it creates the shell code to make the mount which must be piped to /bin/sh.  To illustrate, here is one of the two example scripts.

$ cat net-mount 
#!/bin/sh

# Must be run in tty window.

dir=$(umnt --list |
	dmenu |
	umnt --stdin --verbose |
	sh)

[ "$dir" != "" ]  &&  open "$dir" &

Why do I post that here?  Of course, you might want to use that thing.  My use case is simply "no gvfsd".  But I would also like to get some feedback on the approach and suggestions for the next thing I would like to implement that way: network configuration, that is, have a script that reads configuration information and creates the shell script to configure the network.  But I already understand that this is more difficult.

Offline

Board footer