From e9b4330e9410f43dfe8b95b892b735175774f113 Mon Sep 17 00:00:00 2001 From: Tom Gundersen Date: Tue, 17 Jul 2012 20:48:28 +0200 Subject: os-release: factor out distro name/url This should make the lives of our downstreams slightly simpler by not having to patch rc.sysinit, but rather just ship their own /etc/os-release. Signed-off-by: Tom Gundersen --- functions | 10 ++++++++++ rc.sysinit | 6 ++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/functions b/functions index 794766c..d7b2026 100644 --- a/functions +++ b/functions @@ -335,6 +335,16 @@ kill_all() { fi } +print_welcome() { + # see os-release(5) + . /etc/os-release + + echo " " + printhl "${PRETTY_NAME}\n" + printhl "${C_H2}${HOME_URL}" + printsep +} + load_modules() { local rc=0 diff --git a/rc.sysinit b/rc.sysinit index c031531..8a3c5a4 100755 --- a/rc.sysinit +++ b/rc.sysinit @@ -12,10 +12,8 @@ elif [[ $LOCALE ]]; then export LANG=$LOCALE fi -echo " " -printhl "Arch Linux\n" -printhl "${C_H2}https://www.archlinux.org" -printsep +# Prints distro name and URL +print_welcome # mount the API filesystems # /proc, /sys, /run, /dev, /run/lock, /dev/pts, /dev/shm -- cgit v1.2.3-54-g00ecf