diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/cli_new.c | 2 | ||||
-rw-r--r-- | src/cli_val.h | 1 | ||||
-rw-r--r-- | src/commit2.c | 4 |
3 files changed, 3 insertions, 4 deletions
diff --git a/src/cli_new.c b/src/cli_new.c index 2db7996..f746b7f 100644 --- a/src/cli_new.c +++ b/src/cli_new.c @@ -330,7 +330,7 @@ void di(vtw_sorted *srtp) #define LOCK_FILE "/opt/vyatta/config/.lock" #define COMMIT_CMD "/opt/vyatta/sbin/my_commit" -static void +void release_config_lock() { unlink(LOCK_FILE); diff --git a/src/cli_val.h b/src/cli_val.h index 7f1f512..022f794 100644 --- a/src/cli_val.h +++ b/src/cli_val.h @@ -127,6 +127,7 @@ void mark_paths(vtw_mark *markp); void restore_paths(vtw_mark *markp); extern int get_config_lock(void); +extern void release_config_lock(void); #define VTWERR_BADPATH -2 #define VTWERR_OK 0 diff --git a/src/commit2.c b/src/commit2.c index 04aa79a..5cfecc8 100644 --- a/src/commit2.c +++ b/src/commit2.c @@ -44,8 +44,6 @@ static const char* ActionNames[top_act] = { "end" //7 }; -#define LOCK_FILE "/opt/vyatta/config/.lock" - GNode* get_transactions(GNode*, boolean priority); @@ -203,7 +201,7 @@ main(int argc, char** argv) commit_comment = strdup(optarg); break; case 'l': - unlink(LOCK_FILE); + release_config_lock(); break; default: usage(); |