diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2008-04-28 01:59:13 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2008-04-28 01:59:13 +0000 |
commit | 0484b19829ddbbcf6be39a44a86fdfcd1fd0acac (patch) | |
tree | 70933826da95c88865d03b8f3de23e35c4fc3bc0 | |
parent | d32cf9d2f9018e5ee9b9cc0499397749fe8cc4f5 (diff) | |
download | pfsense-0484b19829ddbbcf6be39a44a86fdfcd1fd0acac.zip pfsense-0484b19829ddbbcf6be39a44a86fdfcd1fd0acac.tar.gz |
Add optional config locking reason and note it in the lock file.
-rw-r--r-- | etc/inc/config.inc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/etc/inc/config.inc b/etc/inc/config.inc index a42c708..4f52b5f 100644 --- a/etc/inc/config.inc +++ b/etc/inc/config.inc @@ -1410,7 +1410,7 @@ function config_validate($conffile) { /* lock configuration file, decide that the lock file * is stale after 10 seconds */ -function config_lock() { +function config_lock($reason = "") { global $g, $process_lock; /* No need to continue if we're the ones holding the lock */ @@ -1424,6 +1424,7 @@ function config_lock() { /* open the lock file in append mode to avoid race condition */ if ($fd = @fopen($lockfile, "x")) { /* succeeded */ + fwrite($fd, $reason); $process_lock = true; fclose($fd); return; |