Revision 7201ca27
Added by Jim Pingle over 14 years ago
etc/rc.firmware | ||
---|---|---|
491 | 491 |
if [ -f /tmp/no_upgrade_reboot_required ]; then |
492 | 492 |
rm /tmp/no_upgrade_reboot_required |
493 | 493 |
else |
494 |
rm -f /var/run/config.lock |
|
495 | 494 |
sh /etc/rc.reboot |
496 | 495 |
fi |
497 | 496 |
|
etc/rc.halt | ||
---|---|---|
2 | 2 |
|
3 | 3 |
# $Id$ |
4 | 4 |
|
5 |
if [ -f /var/run/config.lock ]; then
|
|
6 |
echo "Cannot reboot at this moment, a config write operation is in progress."
|
|
5 |
if ! /usr/bin/lockf -s -t 30 /tmp/config.lock /usr/bin/true; then
|
|
6 |
echo "Cannot halt at this moment, a config write operation is in progress and 30 seconds have passed."
|
|
7 | 7 |
exit -1 |
8 | 8 |
fi |
9 | 9 |
|
etc/rc.reboot | ||
---|---|---|
2 | 2 |
|
3 | 3 |
# $Id$ |
4 | 4 |
|
5 |
if [ -f /var/run/config.lock ]; then
|
|
6 |
echo "Cannot reboot at this moment, a config write operation is in progress." |
|
7 |
exit -1
|
|
5 |
if ! /usr/bin/lockf -s -t 30 /tmp/config.lock /usr/bin/true; then
|
|
6 |
echo "Cannot reboot at this moment, a config write operation is in progress, and 30 seconds have passed."
|
|
7 |
exit 1 |
|
8 | 8 |
fi |
9 | 9 |
|
10 | 10 |
sleep 1 |
etc/rc.shutdown | ||
---|---|---|
1 | 1 |
#!/bin/sh |
2 | 2 |
|
3 |
if [ -f /var/run/config.lock ]; then
|
|
4 |
echo "Cannot reboot at this moment, a config write operation is in progress."
|
|
3 |
if ! /usr/bin/lockf -s -t 30 /tmp/config.lock /usr/bin/true; then
|
|
4 |
echo "Cannot shutdown at this moment, a config write operation is in progress and 30 seconds have passed."
|
|
5 | 5 |
exit -1 |
6 | 6 |
fi |
7 | 7 |
|
tmp/post_upgrade_command | ||
---|---|---|
1 | 1 |
#!/bin/sh |
2 | 2 |
|
3 |
touch /var/run/config.lock |
|
4 | 3 |
/etc/rc.conf_mount_rw |
5 | 4 |
|
6 | 5 |
KERNELTYPE=`cat /boot/kernel/pfsense_kernel.txt` |
Also available in: Unified diff
We no longer use /var/run/config.lock - catch up to other progress. Also, use lockf to test if the config is locked now, with a 30 second timeout.