summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/libeinfo.c3
-rw-r--r--src/librc.c3
-rw-r--r--src/rc.c15
3 files changed, 19 insertions, 2 deletions
diff --git a/src/libeinfo.c b/src/libeinfo.c
index 97a31fe..9561028 100644
--- a/src/libeinfo.c
+++ b/src/libeinfo.c
@@ -30,6 +30,9 @@
* SUCH DAMAGE.
*/
+const char copyright[] = "Copyright (c) 2007 Gentoo Foundation\n"
+ "Copyright (c) 2007 Roy Marples";
+
#include <sys/types.h>
#include <sys/ioctl.h>
#include <sys/stat.h>
diff --git a/src/librc.c b/src/librc.c
index 4a2226f..d5ab76f 100644
--- a/src/librc.c
+++ b/src/librc.c
@@ -30,6 +30,9 @@
* SUCH DAMAGE.
*/
+const char copyright[] = "Copyright (c) 2007 Gentoo Foundation\n"
+ "Copyright (c) 2007 Roy Marples";
+
#include "librc.h"
/* usecs to wait while we poll the fifo */
diff --git a/src/rc.c b/src/rc.c
index aedf347..e7e8ad5 100644
--- a/src/rc.c
+++ b/src/rc.c
@@ -35,6 +35,9 @@
* SUCH DAMAGE.
*/
+const char copyright[] = "Copyright (c) 2007 Gentoo Foundation\n"
+ "Copyright (c) 2007 Roy Marples";
+
#define APPLET "rc"
#define SYSLOG_NAMES
@@ -68,6 +71,8 @@
#include "rc-plugin.h"
#include "strlist.h"
+#include "version.h"
+
#define INITSH RC_LIBDIR "/sh/init.sh"
#define INITEARLYSH RC_LIBDIR "/sh/init-early.sh"
#define HALTSH RC_INITDIR "/halt.sh"
@@ -796,6 +801,11 @@ int main (int argc, char **argv)
if (! applet)
eerrorx ("arguments required");
+ if (argc > 1 && (strcmp (argv[1], "--version") == 0)) {
+ printf ("%s (Open RC) version " VERSION "\n", applet);
+ exit (EXIT_SUCCESS);
+ }
+
/* These used to be programs in their own right, so we shouldn't
* touch argc or argv for them */
if (strcmp (applet, "fstabinfo") == 0)
@@ -968,8 +978,9 @@ int main (int argc, char **argv)
run_script (INITEARLYSH);
uname (&uts);
- printf (" %sOpenRC%s is starting up\n",
- ecolor (ECOLOR_GOOD), ecolor (ECOLOR_NORMAL));
+ printf (" %sOpenRC %s" VERSION "%s is starting up\n",
+ ecolor (ECOLOR_GOOD), ecolor (ECOLOR_BRACKET),
+ ecolor (ECOLOR_NORMAL));
if (rc_env_bool ("RC_INTERACTIVE"))
printf ("Press %sI%s to enter interactive boot mode\n\n",