diff options
author | Tom Gundersen <teg@jklm.no> | 2012-07-17 20:48:28 +0200 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2012-07-17 20:48:28 +0200 |
commit | e9b4330e9410f43dfe8b95b892b735175774f113 (patch) | |
tree | 3f49bc6e1e82940f1cce9b8e41d51d9a18b242d2 | |
parent | c1055b68263e5f1b79d7b92ad79d375e224ef076 (diff) |
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 <teg@jklm.no>
-rw-r--r-- | functions | 10 | ||||
-rwxr-xr-x | rc.sysinit | 6 |
2 files changed, 12 insertions, 4 deletions
@@ -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 @@ -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 |