diff options
author | P. J. McDermott <pj@pehjota.net> | 2016-01-15 18:02:16 (EST) |
---|---|---|
committer | P. J. McDermott <pj@pehjota.net> | 2016-01-15 18:02:16 (EST) |
commit | afac52a2827ef57dd42db321983d5b604221b9ce (patch) | |
tree | e8a7615fe6b921e18262e1847852912dc92e1ca2 /src/profile | |
parent | 8be3dfebfff85fb6ce7f04bee60a30e2d85485e0 (diff) |
profile_find_kernel(): New function
Diffstat (limited to 'src/profile')
-rw-r--r-- | src/profile/proteanos.sh | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/src/profile/proteanos.sh b/src/profile/proteanos.sh index 1936f88..69771a8 100644 --- a/src/profile/proteanos.sh +++ b/src/profile/proteanos.sh @@ -1,6 +1,6 @@ # ProteanOS architecture detection and feeds lists. # -# Copyright (C) 2013-2015 Patrick "P. J." McDermott +# Copyright (C) 2013-2016 Patrick "P. J." McDermott # # This file is part of the ProteanOS Development Kit. # @@ -251,6 +251,26 @@ prof_proteanos_configure_system_foreign() 'root:x:0:\n' >"${root}/etc/group" } +prof_proteanos_find_kernel() +{ + local root="${1}" + local arch="${2}" + local plat="${3}" + local kernel= + + case "${arch}" in + *-linux-*) + for kernel in vmlinuz; do + if [ -e "${root}/boot/${kernel}" ]; then + printf '%s' "/boot/${kernel}" + return 0 + fi + done + ;; + esac + return 1 +} + prof_proteanos_register() { register_profile 'proteanos' |