summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSedat Dilek <sedat.dilek@googlemail.com>2010-09-12 23:17:05 +0200
committerLennart Poettering <lennart@poettering.net>2010-09-13 18:03:00 +0200
commit5a6225fd2e3f60ff304f4d005600a9fec5b10b74 (patch)
tree2555a2c22870c2e1ecd49f674dd22731ee6db537
parent98bc20006d89aa8e7d9d3eeb75f475a66943fe55 (diff)
util: add Debian welcome message
Hi, after talked with Michael on IRC, here is the patch to see a systemd Welcome message on Debian systems. FYI: I had to remove "quiet" from Kernel-command-line to see it. "Stolen from Gentoo" :-) [1,2]? Kind Regards, - Sedat - [1] http://lists.freedesktop.org/archives/systemd-devel/2010-September/000267.html [2] http://cgit.freedesktop.org/systemd/commit/?id=0d37b36b2890fdf8149d12460ebb00822e555977 From 76d860ca774cb8724de25c3ed3c455ebe5d548e3 Mon Sep 17 00:00:00 2001 From: Sedat Dilek <sedat.dilek@gmail.com> Date: Sun, 12 Sep 2010 23:02:22 +0200 Subject: [PATCH] util: add Debian welcome message Include the "Debian" string as /etc/debian_version contains only the Distribution name like "squeeze". Use Light Red color for Debian. Based on a proposal patch of Michael Biebl <biebl@debian.org>
-rw-r--r--src/util.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/util.c b/src/util.c
index ec3df94642..b4beb2d796 100644
--- a/src/util.c
+++ b/src/util.c
@@ -2835,6 +2835,7 @@ void status_welcome(void) {
status_printf("Welcome to \x1B[0;32m%s\x1B[0m!\n", r); /* Green for SUSE */
free(r);
+
#elif defined(TARGET_GENTOO)
char *r;
@@ -2846,6 +2847,18 @@ void status_welcome(void) {
status_printf("Welcome to \x1B[1;34m%s\x1B[0m!\n", r); /* Light Blue for Gentoo */
free(r);
+
+#elif defined(TARGET_DEBIAN)
+ char *r;
+
+ if (read_one_line_file("/etc/debian_version", &r) < 0)
+ return;
+
+ truncate_nl(r);
+
+ status_printf("Welcome to Debian \x1B[1;31m%s\x1B[0m!\n", r); /* Light Red for Debian */
+
+ free(r);
#else
#warning "You probably should add a welcome text logic here."
#endif