diff options
-rw-r--r-- | src/profile.sh | 9 | ||||
-rw-r--r-- | src/profile/proteanos.sh | 22 |
2 files changed, 30 insertions, 1 deletions
diff --git a/src/profile.sh b/src/profile.sh index 607c1cc..08203d1 100644 --- a/src/profile.sh +++ b/src/profile.sh @@ -162,3 +162,12 @@ profile_configure_system_foreign() "prof_${profile}_configure_system_foreign" "${root}" "${arch}" "${plat}" } + +profile_find_kernel() +{ + local root="${1}" + local arch="${2}" + local plat="${3}" + + "prof_${profile}_find_kernel" "${root}" "${arch}" "${plat}" +} 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' |