From 896e4a4f99b5ce827af46938bbc5040d8ae931ac Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Sun, 05 Oct 2014 09:23:01 -0400 Subject: profile_bind_*mount(): New functions --- (limited to 'lib') diff --git a/lib/profile.sh b/lib/profile.sh index d624ed8..5ec2309 100644 --- a/lib/profile.sh +++ b/lib/profile.sh @@ -133,6 +133,28 @@ profile_file_systems_mounted() "prof_${profile}_file_systems_mounted" "${root}" "${arch}" "${plat}" } +profile_bind_mount() +{ + local arch="${1}" + local plat="${2}" + local olddir="${3}" + local newdir="${4}" + + "prof_${profile}_bind_mount" "${arch}" "${plat}" \ + "${olddir}" "${newdir}" +} + +profile_bind_umount() +{ + local arch="${1}" + local plat="${2}" + local olddir="${3}" + local newdir="${4}" + + "prof_${profile}_bind_umount" "${arch}" "${plat}" \ + "${olddir}" "${newdir}" +} + profile_configure_system_native() { local root="${1}" diff --git a/lib/profile/proteanos.sh b/lib/profile/proteanos.sh index 3a3926f..ee3627d 100644 --- a/lib/profile/proteanos.sh +++ b/lib/profile/proteanos.sh @@ -184,6 +184,34 @@ prof_proteanos_file_systems_mounted() [ -e "${root}/dev/null" ] } +prof_proteanos_bind_mount() +{ + local arch="${1}" + local plat="${2}" + local olddir="${3}" + local newdir="${4}" + + case "${arch}" in + *-linux-*) + mount -o bind "${olddir}" "${newdir}" + ;; + esac +} + +prof_proteanos_bind_umount() +{ + local arch="${1}" + local plat="${2}" + local olddir="${3}" + local newdir="${4}" + + case "${arch}" in + *-linux-*) + umount "${newdir}" + ;; + esac +} + prof_proteanos_configure_system_native() { local root="${1}" -- cgit v0.9.1