changed order of config lock check on shutdown, if some (custom) scripts waits to long the webui might still trash the config

This commit is contained in:
Ad Schellevis 2015-03-31 09:11:16 +00:00
parent d6ae716445
commit bd114c0d88

View File

@ -1,5 +1,11 @@
#!/bin/sh
# shutdown rc scripts
/usr/local/etc/rc.opnsense stop
/usr/local/etc/rc.backup_rrd
/usr/local/etc/rc.backup_dhcpleases
# wait for config lock to release
php -a >/dev/null << EOF
\$fp = fopen('/conf/config.xml', "w+");
@ -10,10 +16,4 @@ if (flock(\$fp, LOCK_EX)) {
EOF
# shutdown rc scripts
/usr/local/etc/rc.opnsense stop
/usr/local/etc/rc.backup_rrd
/usr/local/etc/rc.backup_dhcpleases
/sbin/shutdown -op now