Most people don't use vmtouch as a service, instead as an interactive command-line tool. If you use the daemon functionality in the deb, can you please send a pull request to our github repo?

https://github.com/hoytech/vmtouch/tree/master/debian

Thanks!

Doug


On 2019-12-28 9:01 a.m., MichaIng wrote:
Package: vmtouch
Version: 1.3.1-1
And: 1.3.0-1

Hey guys,

this is a very embarrassing bug, did nobody actually test the service before merging this into stable repository?
__________
root@VM-Buster:~# grep '^DAEMON=' /etc/init.d/vmtouch
DAEMON=/usr/sbin/vmtouch
root@VM-Buster:~# which -a vmtouch
/usr/bin/vmtouch
/bin/vmtouch
__________

This is especially nasty since the service does not report any error in such case, so users will probably not even recognise that it failed:
__________
root@VM-Buster:~# systemctl restart vmtouch
root@VM-Buster:~# systemctl status vmtouch
● vmtouch.service - LSB: Start vmtouch daemon
   Loaded: loaded (/etc/init.d/vmtouch; generated)
   Active: active (exited) since Sat 2019-12-28 14:56:02 CET; 9s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 19876 ExecStart=/etc/init.d/vmtouch start (code=exited, status=0/SUCCESS)

Dec 28 14:56:02 VM-Buster systemd[1]: Starting LSB: Start vmtouch daemon...
Dec 28 14:56:02 VM-Buster systemd[1]: Started LSB: Start vmtouch daemon.
root@VM-Buster:~# pgrep vmtouch
<nothing>
__________

Solution:
__________
root@VM-Buster:~# sed -i 's|/usr/sbin/vmtouch|/usr/bin/vmtouch|' /etc/init.d/vmtouch
root@VM-Buster:~# systemctl daemon-reload
root@VM-Buster:~# systemctl restart vmtouch
root@VM-Buster:~# systemctl status vmtouch
● vmtouch.service - LSB: Start vmtouch daemon
   Loaded: loaded (/etc/init.d/vmtouch; generated)
   Active: active (running) since Sat 2019-12-28 14:57:35 CET; 10s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 19907 ExecStart=/etc/init.d/vmtouch start (code=exited, status=0/SUCCESS)
    Tasks: 1 (limit: 2387)
   Memory: 828.0K
   CGroup: /system.slice/vmtouch.service
           └─19911 /usr/bin/vmtouch -d -l -m 1 /boot/dietpi

Dec 28 14:57:35 VM-Buster systemd[1]: Starting LSB: Start vmtouch daemon...
Dec 28 14:57:35 VM-Buster vmtouch[19907]: Starting: vmtouch.
Dec 28 14:57:35 VM-Buster systemd[1]: Started LSB: Start vmtouch daemon.
root@VM-Buster:~# pgrep vmtouch
19911
__________

Since one can choose the run user via /etc/default/vmtouch, moving the binary to sbin seems to be the worse alternative solution.

Best regards,
MichaIng

Reply via email to