From: Cristiano Giuffrida Date: Thu, 1 Jul 2010 18:48:25 +0000 (+0000) Subject: Self update support in RS. X-Git-Tag: v3.1.8~297 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/Bv9ARM.ch09.html?a=commitdiff_plain;h=03f64ac97a9b693048f3f9ae76c274b3be8fd947;p=minix.git Self update support in RS. --- diff --git a/commands/service/service.c b/commands/service/service.c index 077da6fb0..bfd7431e0 100644 --- a/commands/service/service.c +++ b/commands/service/service.c @@ -55,6 +55,8 @@ PRIVATE char *known_requests[] = { #define RUN_CMD "run" #define RUN_SCRIPT "/etc/rs.single" /* Default script for 'run' */ +#define SELF_BINARY "self" +#define SELF_REQ_PATH "/dev/null" #define PATH_CONFIG _PATH_SYSTEM_CONF /* Default config file */ #define DEFAULT_LU_STATE SEF_LU_STATE_WORK_FREE /* Default lu state */ #define DEFAULT_LU_MAXTIME 0 /* Default lu max time */ @@ -63,6 +65,7 @@ PRIVATE char *known_requests[] = { #define OPT_COPY "-c" /* copy executable image */ #define OPT_REUSE "-r" /* reuse executable image */ #define OPT_NOBLOCK "-n" /* unblock caller immediately */ +#define OPT_REPLICA "-p" /* create replica for the service */ /* Define names for arguments provided to this utility. The first few * arguments are required and have a known index. Thereafter, some optional @@ -104,6 +107,7 @@ PRIVATE int req_type; PRIVATE int do_run= 0; /* 'run' command instead of 'up' */ PRIVATE char *req_label = NULL; PRIVATE char *req_path = NULL; +PRIVATE char *req_path_self = SELF_REQ_PATH; PRIVATE char *req_args = ""; PRIVATE int req_major = 0; PRIVATE int req_dev_style = STYLE_NDEV; @@ -128,8 +132,8 @@ PRIVATE void print_usage(char *app_name, char *problem) fprintf(stderr, "Warning, %s\n", problem); fprintf(stderr, "Usage:\n"); fprintf(stderr, - " %s [%s %s %s] (up|run|update) [%s ] [%s ] [%s