I would believe providing fixes by users who actually use the stuff is the better idea (also more rewarding). Why not installing OMV 2/3/4, then providing a fix that works on Debian wheezy/jessie/stretch and then send a pull request?
Autoshutdown-Plugin not working under OMV v4 and Debian Stretch with 4.12 kernel
-
- OMV 4.x
- Huberer
-
-
If I could, I would, but I'm just a normal user with no programming experience. I detect a bug and post, like 90% of the users in this forum do (and with 90% of the forums in the www).
I do use OMV v4 otherwise I wouldn't have found this issue. Sorry, but your post couldn't help me furhter -
this plugin is not ready for OMV v4.
The reason it is in the repos is for testing since OMV 4.x is in testing. The only person really maintaining the plugin is me and I don't use it and have no way to test it. I'm not sure how I can fix it.
-
-
It's a pity that you're the only one.
What I found out in the meantime is, that the script can't read the setting from the ethernet-card correct.Code
Display Moreroot@HomeServer:/# ifconfig enp0s25 enp0s25: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.1.200 netmask 255.255.255.0 broadcast 192.168.1.255 ether XX:XX:XX:XX:XX:XX txqueuelen 1000 (Ethernet) RX packets 7652 bytes 2366551 (2.2 MiB) RX errors 0 dropped 6 overruns 0 frame 0 TX packets 19918 bytes 10111130 (9.6 MiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 device interrupt 20 memory 0xf7d00000-f7d20000 root@HomeServer:/#
But I've no clue how to fix it or where to start
-
Did you merge the pull request from @yo1frenchtoast into the auto shutdown-script? I found them approx. one hour ago but now they're gone. By looking closer I could find them in the code.
I can say that these codes are working.There was another fix according to port scanning or similar. This one I can't find any more because it was also posted together with the pull request. Maybe you also added this fix to the script.
I've also seen that you added the fix from @tkaiser. This one is also working perfect.
So, it looks that ASD is now ready for OMV v4.
Thank you @ryecoaaron, @tkaiser and @yo1frenchtoast for helping in this matter to get the Autoshutdown-Plugin working perfect for OMV v4/Debian 9
@yo1frenchtoast
I've seen on your GitHub-side for ASD that you're still using the "old"-ethernet-card-naming at line 1180 (look at here). This is good for OMV v3 but not for OMV v4. Maybe you also update this issue so that you won't face any problems when you upgrade. -
Did you merge the pull request from @yo1frenchtoast into the auto shutdown-script?
Yes. I also pushed the latest version of the plugin to the OMV 4.x repo.
-
-
I am testing ASD right now with OMV 4, but it is complaining about a syntax error for FORCE_NIC.
/usr/sbin/autoshutdown.sh: Zeile 1155: Syntaxfehler beim unerwarteten Wort `|'
/usr/sbin/autoshutdown.sh: Zeile 1155: ` [[ "$FORCE_NIC" =~ ^([a-z]{3,}[0-9]{1}\.{0,1}[0-9]{0,}|[a-z]{3,}[0-9]{1}\.{0,1}[0-9]{0,})+( [a-z]{3,}[0-9]{1}\.{0,1}[0-9]{0,})*$ ]]|| {'i thought it should not check for FORCE_NIC on stretch.
And one more thing, i think on line 1153 a bracket missing? (wheezy|jessie), but this did not fix it anyway.
-
You're right but don't have much time yet. Replace these lines from 1151-1163
Code
Display More# Check $FORCE_NIC env only on wheezy/jessie since starting with stretch 'predictable interface names' make regex a bit unpredictable case ${lsb_release -cs) in wheezy|jessie) if [ ! -z "$FORCE_NIC" ]; then [[ "$FORCE_NIC" =~ ^([a-z]{3,}[0-9]{1}\.{0,1}[0-9]{0,}|[a-z]{3,}[0-9]{1}\.{0,1}[0-9]{0,})+( [a-z]{3,}[0-9]{1}\.{0,1}[0-9]{0,})*$ ]]|| { _log "WARN: Invalid parameter format: FORCE_NIC" _log "WARN: You set it to '$FORCE_NIC', which is not a correct syntax. It has to match '[a-z]{3,}[0-9]{1}\.{0,1}[0-9]{0,}'" _log "WARN: with spaces between every NIC: e.g. \"eth1 wlan0 usb3 eth1.2\"" _log "WARN: Unsetting FORCE_NIC" unset FORCE_NIC; } fi ;; esac
with these ones
Code# FORCE_NIC if [ ! -z "$FORCE_NIC" ]; then [[ "$FORCE_NIC" =~ ^([a-z]{3,}[0-9]{1}\.{0,1}[0-9]{0,}|[a-z]{3,}[0-9]{1}\.{0,1}[0-9]{0,})+( [a-z]{3,}[0-9]{1}\.{0,1}[0-9]{0,})*$ ]]|| { _log "WARN: Invalid parameter format: FORCE_NIC" _log "WARN: You set it to '$FORCE_NIC', which is not a correct syntax. It has to match '[a-z]{3,}[0-9]{1}\.{0,1}[0-9]{0,}'" _log "WARN: with spaces between every NIC: e.g. \"eth1 wlan0 usb3 eth1.2\"" _log "WARN: Unsetting FORCE_NIC" unset FORCE_NIC; } fi
and everything should work (at least for me)
Don't know what happened here. -
And one more thing, i think on line 1153 a bracket missing? (wheezy|jessie), but this did not fix it anyway.
There was a bracket instead of a parentheses. Fixed in 4.0.1 in repo now.
-
-
-
Hi,
I want to follow this threat and report a seemingly different issue with autoshutdown (4.02).
I have just made a fresh install of OMV4 and everything seems to work smoothly, with the exeption of autoshutdown.
Whenever I start the service, it exits after a few minutes with the following lines found in syslog:CodeDec 29 09:37:46 TINE autoshutdown.sh[2214]: /usr/sbin/autoshutdown.sh: line 1199: ifconfig: command not found Dec 29 09:37:46 TINE systemd[1]: autoshutdown.service: Main process exited, code=exited, status=1/FAILURE Dec 29 09:37:46 TINE systemd[1]: autoshutdown.service: Unit entered failed state. Dec 29 09:37:46 TINE systemd[1]: autoshutdown.service: Failed with result 'exit-code'.
Any advice on this? As I said, apart from that OMV is running great and I can live without autoshutdown.
Thanks for the great work,
T. -
Any advice on this?
Install net-tools... apt-get install net-tools The plugin needs to be ported to use the iproute commands.
-
-
Install net-tools... apt-get install net-tools The plugin needs to be ported to use the iproute commands.
That fixed it for me, thank you..
Just another observation: autoshutdown seems to log into "boot" not into "syslog"
cheers, T. -
Just another observation: autoshutdown seems to log into "boot" not into "syslog"
It uses /usr/bin/logger and logs to both since the boot log gets its info from systemd and the syslog log gets its info from /var/log/syslog. If you want to try, just do: logger test
-
There is some way to fix the logging? Or do we need to wait for the next autoshutdown update?
-
-
It uses /usr/bin/logger and logs to both since the boot log gets its info from systemd and the syslog log gets its info from /var/log/syslog. If you want to try, just do: logger test
I tried to logger test and wrote inside "boot". There is some way to correct this behavoir of autoshutdown?
-
There is some way to correct this behavoir of autoshutdown?
The plugin would probably have to be change to not use logger. Not real high on priority list right now.
Participate now!
Don’t have an account yet? Register yourself now and be a part of our community!