aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2008-01-03 13:02:03 +0000
committerRoy Marples <roy@marples.name>2008-01-03 13:02:03 +0000
commit3a1cc82a8dbdfd73426d4120c84c7121118af546 (patch)
treef8ed679b155535299c3b1c98f5994681ae9c3b85
parentb6228a987e93356d1e9361399a63d2033eec6d63 (diff)
Allow a BRANDING define to be used.
-rw-r--r--README3
-rw-r--r--src/rc.c14
2 files changed, 15 insertions, 2 deletions
diff --git a/README b/README
index 0a206875..cf959f9c 100644
--- a/README
+++ b/README
@@ -14,6 +14,9 @@ PAM=pam
TERMCAP=ncurses
TERMCAP=termcap
+You can also brand OpenRC if you so wish like so
+BRANDING=\"Gentoo/$(uname -s)\"
+
If any of the following files exist then we do not overwrite them
/etc/devd.conf
/etc/rc
diff --git a/src/rc.c b/src/rc.c
index 1bdf588e..ac462ff5 100644
--- a/src/rc.c
+++ b/src/rc.c
@@ -877,7 +877,11 @@ int main (int argc, char **argv)
eerrorx ("arguments required");
if (argc > 1 && (strcmp (argv[1], "--version") == 0)) {
- printf ("%s (OpenRC) version " VERSION "\n", applet);
+ printf ("%s (OpenRC"
+#ifdef BRANDING
+ " " BRANDING
+#endif
+ ") version " VERSION "\n", applet);
exit (EXIT_SUCCESS);
}
@@ -1059,7 +1063,13 @@ int main (int argc, char **argv)
run_script (INITEARLYSH);
uname (&uts);
- printf ("\n %sOpenRC %s" VERSION "%s is starting up\n\n",
+ printf ("\n %sOpenRC %s" VERSION "%s is starting up %s",
+#ifdef BRANDING
+ BRANDING
+#else
+ ""
+#endif
+ "\n\n",
ecolor (ECOLOR_GOOD), ecolor (ECOLOR_HILITE),
ecolor (ECOLOR_NORMAL));