Style updates
This commit is contained in:
@ -21,17 +21,17 @@
|
|||||||
#include "rc-misc.h"
|
#include "rc-misc.h"
|
||||||
#include "strlist.h"
|
#include "strlist.h"
|
||||||
|
|
||||||
#define ENVDIR "/etc/env.d"
|
#define ENVDIR "/etc/env.d"
|
||||||
#define PROFILE_ENV "/etc/profile.env"
|
#define PROFILE_ENV "/etc/profile.env"
|
||||||
#define CSH_ENV "/etc/csh.env"
|
#define CSH_ENV "/etc/csh.env"
|
||||||
#define LDSOCONF "/etc/ld.so.conf"
|
#define LDSOCONF "/etc/ld.so.conf"
|
||||||
|
|
||||||
#define NOTICE "# THIS FILE IS AUTOMATICALLY GENERATED BY env-update.\n" \
|
#define NOTICE "# THIS FILE IS AUTOMATICALLY GENERATED BY env-update.\n" \
|
||||||
"# DO NOT EDIT THIS FILE. CHANGES TO STARTUP PROFILES\n" \
|
"# DO NOT EDIT THIS FILE. CHANGES TO STARTUP PROFILES\n" \
|
||||||
"# GO INTO %s NOT %s\n\n"
|
"# GO INTO %s NOT %s\n\n"
|
||||||
|
|
||||||
#define LDNOTICE "# ld.so.conf autogenerated by env-update; make all\n" \
|
#define LDNOTICE "# ld.so.conf autogenerated by env-update; make all\n" \
|
||||||
"# changes to contents of /etc/env.d directory\n"
|
"# changes to contents of /etc/env.d directory\n"
|
||||||
|
|
||||||
static const char *specials[] = {
|
static const char *specials[] = {
|
||||||
"ADA_INCLUDE_PATH",
|
"ADA_INCLUDE_PATH",
|
||||||
|
@ -145,13 +145,13 @@ int main (int argc, char **argv)
|
|||||||
char c;
|
char c;
|
||||||
|
|
||||||
static struct option longopts[] = {
|
static struct option longopts[] = {
|
||||||
{ "fstype-regex", 1, NULL, 'F'},
|
{ "fstype-regex", 1, NULL, 'F'},
|
||||||
{ "node-regex", 1, NULL, 'N'},
|
{ "node-regex", 1, NULL, 'N'},
|
||||||
{ "skip-regex", 1, NULL, 'S'},
|
{ "skip-regex", 1, NULL, 'S'},
|
||||||
{ "fstype", 0, NULL, 'f'},
|
{ "fstype", 0, NULL, 'f'},
|
||||||
{ "node", 0, NULL, 'n'},
|
{ "node", 0, NULL, 'n'},
|
||||||
{ "reverse", 0, NULL, 'r'},
|
{ "reverse", 0, NULL, 'r'},
|
||||||
{ NULL, 0, NULL, 0}
|
{ NULL, 0, NULL, 0}
|
||||||
};
|
};
|
||||||
|
|
||||||
while ((c = getopt_long (argc, argv, "F:N:S:fnr",
|
while ((c = getopt_long (argc, argv, "F:N:S:fnr",
|
||||||
|
@ -63,11 +63,11 @@ int main (int argc, char **argv)
|
|||||||
int j;
|
int j;
|
||||||
|
|
||||||
const struct option longopts[] = {
|
const struct option longopts[] = {
|
||||||
{"all", 0, NULL, 'a'},
|
{"all", 0, NULL, 'a'},
|
||||||
{"list", 0, NULL, 'l'},
|
{"list", 0, NULL, 'l'},
|
||||||
{"servicelist", 0, NULL, 's'},
|
{"servicelist", 0, NULL, 's'},
|
||||||
{"unused", 0, NULL, 'u'},
|
{"unused", 0, NULL, 'u'},
|
||||||
{NULL, 0, NULL, 0}
|
{NULL, 0, NULL, 0}
|
||||||
};
|
};
|
||||||
|
|
||||||
while ((c = getopt_long(argc, argv, "alsu", longopts, &option_index)) != -1)
|
while ((c = getopt_long(argc, argv, "alsu", longopts, &option_index)) != -1)
|
||||||
|
16
src/rc.h
16
src/rc.h
@ -16,12 +16,12 @@
|
|||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
|
||||||
/* Special level names */
|
/* Special level names */
|
||||||
#define RC_LEVEL_SYSINIT "sysinit"
|
#define RC_LEVEL_SYSINIT "sysinit"
|
||||||
#define RC_LEVEL_BOOT "boot"
|
#define RC_LEVEL_BOOT "boot"
|
||||||
#define RC_LEVEL_SINGLE "single"
|
#define RC_LEVEL_SINGLE "single"
|
||||||
#define RC_LEVEL_SHUTDOWN "shutdown"
|
#define RC_LEVEL_SHUTDOWN "shutdown"
|
||||||
#define RC_LEVEL_REBOOT "reboot"
|
#define RC_LEVEL_REBOOT "reboot"
|
||||||
#define RC_LEVEL_DEFAULT "default"
|
#define RC_LEVEL_DEFAULT "default"
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
@ -100,8 +100,8 @@ typedef struct rc_depinfo
|
|||||||
/* Options for rc_dep_depends and rc_order_services.
|
/* Options for rc_dep_depends and rc_order_services.
|
||||||
When changing runlevels, you should use RC_DEP_START and RC_DEP_STOP for
|
When changing runlevels, you should use RC_DEP_START and RC_DEP_STOP for
|
||||||
the start and stop lists as we tweak the provided services for this. */
|
the start and stop lists as we tweak the provided services for this. */
|
||||||
#define RC_DEP_TRACE 0x01
|
#define RC_DEP_TRACE 0x01
|
||||||
#define RC_DEP_STRICT 0x02
|
#define RC_DEP_STRICT 0x02
|
||||||
#define RC_DEP_START 0x04
|
#define RC_DEP_START 0x04
|
||||||
#define RC_DEP_STOP 0x08
|
#define RC_DEP_STOP 0x08
|
||||||
|
|
||||||
|
@ -29,8 +29,8 @@
|
|||||||
#include "rc-plugin.h"
|
#include "rc-plugin.h"
|
||||||
#include "strlist.h"
|
#include "strlist.h"
|
||||||
|
|
||||||
#define RCSCRIPT_HELP RC_LIBDIR "/sh/rc-help.sh"
|
#define RCSCRIPT_HELP RC_LIBDIR "/sh/rc-help.sh"
|
||||||
#define SELINUX_LIB RC_LIBDIR "/runscript_selinux.so"
|
#define SELINUX_LIB RC_LIBDIR "/runscript_selinux.so"
|
||||||
|
|
||||||
static char *applet = NULL;
|
static char *applet = NULL;
|
||||||
static char *exclusive = NULL;
|
static char *exclusive = NULL;
|
||||||
@ -427,7 +427,7 @@ static void svc_start (const char *service, bool deps)
|
|||||||
|
|
||||||
if (rc_is_env ("IN_HOTPLUG", "1") || in_background) {
|
if (rc_is_env ("IN_HOTPLUG", "1") || in_background) {
|
||||||
if (! rc_service_state (service, rc_service_inactive) &&
|
if (! rc_service_state (service, rc_service_inactive) &&
|
||||||
! rc_service_state (service, rc_service_stopped))
|
! rc_service_state (service, rc_service_stopped))
|
||||||
exit (EXIT_FAILURE);
|
exit (EXIT_FAILURE);
|
||||||
background = true;
|
background = true;
|
||||||
}
|
}
|
||||||
@ -634,7 +634,7 @@ static void svc_stop (const char *service, bool deps)
|
|||||||
|
|
||||||
if (rc_is_env ("IN_HOTPLUG", "1") || in_background)
|
if (rc_is_env ("IN_HOTPLUG", "1") || in_background)
|
||||||
if (! rc_service_state (service, rc_service_started) &&
|
if (! rc_service_state (service, rc_service_started) &&
|
||||||
! rc_service_state (service, rc_service_inactive))
|
! rc_service_state (service, rc_service_inactive))
|
||||||
exit (EXIT_FAILURE);
|
exit (EXIT_FAILURE);
|
||||||
|
|
||||||
if (rc_service_state (service, rc_service_stopped))
|
if (rc_service_state (service, rc_service_stopped))
|
||||||
@ -819,14 +819,14 @@ int main (int argc, char **argv)
|
|||||||
char c;
|
char c;
|
||||||
|
|
||||||
static struct option longopts[] = {
|
static struct option longopts[] = {
|
||||||
{ "debug", 0, NULL, 'd'},
|
{ "debug", 0, NULL, 'd'},
|
||||||
{ "help", 0, NULL, 'h'},
|
{ "help", 0, NULL, 'h'},
|
||||||
{ "nocolor", 0, NULL, 'C'},
|
{ "nocolor", 0, NULL, 'C'},
|
||||||
{ "nocolour", 0, NULL, 'C'},
|
{ "nocolour", 0, NULL, 'C'},
|
||||||
{ "nodeps", 0, NULL, 'D'},
|
{ "nodeps", 0, NULL, 'D'},
|
||||||
{ "quiet", 0, NULL, 'q'},
|
{ "quiet", 0, NULL, 'q'},
|
||||||
{ "verbose", 0, NULL, 'v'},
|
{ "verbose", 0, NULL, 'v'},
|
||||||
{ NULL, 0, NULL, 0}
|
{ NULL, 0, NULL, 0}
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Show help if insufficient args */
|
/* Show help if insufficient args */
|
||||||
|
Reference in New Issue
Block a user