Closed robp2175 closed 6 years ago
As the message says ".device" without any prepended device name, I assume you renamed the service template and tried to systemctl start usbmount.service
? The service file is a template that is triggered by a udev rule for the device insertion (aka /bin/systemd-escape -p --template=usbmount@.service $env{DEVNAME}
). You obviously have a corrupt installation if you had missing files. How did you build and install? On what distrubution/version are you running?
You are correct, I did misunderstanding how this worked. That makes sense now.
I am using Debian Stretch
This is how I build it apt-get update && sudo apt-get install -y debhelper git clone https://github.com/rbrito/usbmount.git cd usbmount dpkg-buildpackage -us -uc -b dpkg -i ../usbmount_0.0.24_all.deb
Everything seems to install without a problem except some of the files are not installed where they should be. Specifically the conf files.
`` /opt/usbmount# ls -la /etc/usbmount/ total 16 drwxr-xr-x 4 root root 4096 May 24 09:41 . drwxr-xr-x 117 root root 4096 May 24 09:41 .. drwxr-xr-x 2 root root 4096 May 24 09:41 mount.d drwxr-xr-x 2 root root 4096 May 24 09:41 umount.d
/opt/usbmount# ls -la /etc/usbmount/mount.d/ total 8 drwxr-xr-x 2 root root 4096 May 24 09:41 . drwxr-xr-x 4 root root 4096 May 24 09:41 ..
/opt/usbmount# ls -la /etc/usbmount/umount.d/ total 8 drwxr-xr-x 2 root root 4096 May 24 09:41 . drwxr-xr-x 4 root root 4096 May 24 09:41 ..
Of course I went ahead and copied them over, but usbmount does not seem to work.
It seems this is a dependency issue. dpkg
does not install dependencies of a given local deb file so your installation is likely incomplete due to missing dependencies. There are a few ways to deal with this when installing files directly, ex:
Option 1: let apt-get fix missing dependencies.
# Try install, will not necessarily complete if you're missing a dependency
dpkg -i <package>.deb
# Will install missing dependencies and finish the install process
apt-get install -f
Option 2: use a package installer that fetches dependencies even for local packages (ex. gdebi).
# Only required the first time you do this with any package
apt-get install gdebi
# Actually install the package
gdebi <package>.deb
From journalctl -xe