blumzi / LAST_tools

Various LAST management tools
0 stars 0 forks source link

infinite loop calling `last-tool enforce -n` #26

Closed EastEriq closed 1 year ago

EastEriq commented 1 year ago

I did sudo last-tool enforce -n hosts. I know that the syntax is wrong, and I should have typed -n before enforce. But I got an uninterruptible stream of

last-tool: FATAL: Unknown section "-n".
last-tool: FATAL: Unknown section "-n".
last-tool: FATAL: Unknown section "-n".
last-tool: FATAL: Unknown section "-n".
last-tool: FATAL: Unknown section "-n".

Ctrl-C didn't stop them, I had to Ctrl-z, and kill the process by PID.

EastEriq commented 1 year ago

Go figure, if I call sudo last-tool -n enforce hosts I get

last-tool: FATAL: Unknown section "hosts".
last-tool: FATAL: Unknown section "hosts".
last-tool: FATAL: Unknown section "hosts".
last-tool: FATAL: Unknown section "hosts".
last-tool: FATAL: Unknown section "hosts".
last-tool: FATAL: Unknown section "hosts".
last-tool: FATAL: Unknown section "hosts".
^Z
[2]+  Stopped                 sudo last-tool -n enforce hosts

ditto. That's on

ocs@last12w:~/matlab/AstroPack$ last-tool -v
1.0.8528.21892
EastEriq commented 1 year ago

Note that apparently the version on last12w was built only three days ago. On last11e for instance there are no such problems:

ocs@last11e:~/matlab/LAST/LAST_Api$ last-tool -n enforce hosts
last-tool: FATAL: Unknown section "hosts".
ocs@last11e:~/matlab/LAST/LAST_Api$ sudo last-tool -n enforce hosts
[sudo] password for ocs: 
last-tool: FATAL: Unknown section "hosts".

( yes, ok, I meant hostname); and I note that last-tool -v is more informative:

ocs@last11e:~/matlab/LAST/LAST_Api$ last-tool -v
Git-repo:      https://github.com/blumzi/LAST_tools
Git-branch:    main
Git-commit:    https://github.com/blumzi/LAST_tools/commits/986312b
Build-time:    Sun 19 Feb 2023 12:57:50 UTC
Build-machine: last12w
blumzi commented 1 year ago

Commit 310018f fixes bad flags, sections or running mode.