diff options
author | P. J. McDermott <pj@pehjota.net> | 2014-08-22 13:32:30 (EDT) |
---|---|---|
committer | P. J. McDermott <pj@pehjota.net> | 2014-08-22 13:32:30 (EDT) |
commit | 822ef1d5bc3857f0dccf343c8c1c297362c2af21 (patch) | |
tree | 5466283ea01323dd40381b04349a15226d5e01bb /lib | |
parent | 49f11913b3cff1ae38e1ecb4395fffc50dbe10e1 (diff) |
profile_get_os_release(): New function
Diffstat (limited to 'lib')
-rw-r--r-- | lib/profile.sh | 9 | ||||
-rw-r--r-- | lib/profiles/proteanos.sh | 22 |
2 files changed, 31 insertions, 0 deletions
diff --git a/lib/profile.sh b/lib/profile.sh index b37b6f7..d3c08ec 100644 --- a/lib/profile.sh +++ b/lib/profile.sh @@ -136,3 +136,12 @@ profile_configure_system_foreign() "prof_${profile}_configure_system_foreign" "${root}" } + +# TODO: /etc/os-release should be provided by base-files. +profile_get_os_release() +{ + local arch="${1}" + local plat="${2}" + + "prof_${profile}_get_os_release" "${arch}" "${plat}" +} diff --git a/lib/profiles/proteanos.sh b/lib/profiles/proteanos.sh index d221c1b..259dc48 100644 --- a/lib/profiles/proteanos.sh +++ b/lib/profiles/proteanos.sh @@ -47,6 +47,16 @@ start() rm "${SCRIPT}" } ' +prof_proteanos_os_release_linux="\ +NAME='ProteanOS BusyBox/Linux-libre' +VERSION='1.0' +ID=proteanos +VERSION_ID='1.0' +PRETTY_NAME='ProteanOS BusyBox/Linux-libre 1.0' +ANSI_COLOR='1;34' +HOME_URL='http://www.proteanos.com/' +BUG_REPORT_URL='mailto:proteanos-dev@lists.proteanos.com' +" prof_proteanos_normalize_suite() { @@ -199,3 +209,15 @@ prof_proteanos_configure_system_foreign() [ -e "${root}/etc/passwd" ] || printf \ 'root::0:0:root:/root:/bin/sh\n' >"${root}/etc/passwd" } + +prof_proteanos_get_os_release() +{ + local arch="${1}" + local plat="${2}" + + case "${arch}" in + *-linux-*) + printf '%s\n' "${prof_proteanos_os_release_linux}" + ;; + esac +} |