summaryrefslogtreecommitdiff
path: root/src/cli_objects.c
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@vyos.io>2024-04-29 09:48:40 +0200
committerGitHub <noreply@github.com>2024-04-29 09:48:40 +0200
commit5915fa1b459a44d0b0928f4895ccde6ccb3e7af0 (patch)
tree3d522d347612b37b5931e97f93e0a739c48f908e /src/cli_objects.c
parent23b79df8bf766e72b8eb697b4726d843664c46c3 (diff)
parentbd9a4fab9cf02a2aa2e33b5a4fba970308491ea0 (diff)
downloadvyatta-cfg-mergify/bp/sagitta/pr-77.tar.gz
vyatta-cfg-mergify/bp/sagitta/pr-77.zip
Merge pull request #78 from jestabro/sagitta-configdep-redundancymergify/bp/sagitta/pr-77
T5660: Remove redundant calls to config dependency scripts
Diffstat (limited to 'src/cli_objects.c')
-rw-r--r--src/cli_objects.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/cli_objects.c b/src/cli_objects.c
index 190ff46..c09c368 100644
--- a/src/cli_objects.c
+++ b/src/cli_objects.c
@@ -34,6 +34,7 @@ static first_seg f_seg_m;
static char *in_commit_file = "/var/tmp/in_commit";
static char *initial_file = "/var/tmp/initial_in_commit";
+static char *last_in_queue_file = "/var/tmp/last_in_queue";
static int mark_by_file(char *p) {
int ret = mknod(p, S_IFREG|0664, 0);
@@ -96,6 +97,16 @@ void set_in_commit(boolean b) {
}
}
+void set_if_last(int n) {
+ if (n == 1) {
+ mark_by_file(last_in_queue_file);
+ }
+}
+
+void clear_last(void) {
+ remove_mark(last_in_queue_file);
+}
+
boolean is_in_exec(void) {
return in_exec;
}