[systemd-commits] src/util.c
Lennart Poettering
lennart at kemper.freedesktop.org
Mon Sep 13 09:04:10 PDT 2010
src/util.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
New commits:
commit 5a6225fd2e3f60ff304f4d005600a9fec5b10b74
Author: Sedat Dilek <sedat.dilek at googlemail.com>
Date: Sun Sep 12 23:17:05 2010 +0200
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 at 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 at debian.org>
diff --git a/src/util.c b/src/util.c
index ec3df94..b4beb2d 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
More information about the systemd-commits
mailing list