From afac52a2827ef57dd42db321983d5b604221b9ce Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Fri, 15 Jan 2016 18:02:16 -0500 Subject: profile_find_kernel(): New function --- (limited to 'src/profile') 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' -- cgit v0.9.1