Browse Source

add fast host-clone creation with facadefs

master
Markus Bergholz 6 years ago
parent
commit
2f1dc3905d
1 changed files with 13 additions and 0 deletions
  1. +13
    -0
      createchroot

+ 13
- 0
createchroot View File

@@ -32,6 +32,17 @@ function sudo_make_arch(){

}

function make_hostclone(){

mkdir -p $folder/{root,cache}
if which facadefs >/dev/null; then
facadefs / $folder/cache $folder/root/ -o allow_root
printf "Host-Clone created, please run 'superchroot $folder/root/'\n"
else
printf "Error, can't find facadefs.\n"
fi
}


if (("$#" == 1)); then

@@ -85,6 +96,7 @@ elif (("$#" == 2)); then
"sid") make_debian $linux $folder ;;
"precise") make_ubuntu $linux $folder ;;
"raring") make_ubuntu $linux $folder ;;
"host") make_hostclone $folder ;;
*) printf "Unknown or unsupported linux\n" ;;
esac
else
@@ -95,6 +107,7 @@ elif (("$#" == 2)); then
"precise") sudo_make_ubuntu $linux $folder ;;
"raring") sudo_make_ubuntu $linux $folder ;;
"arch") sudo_make_arch $folder ;;
"host") make_hostclone $folder ;;
*) printf "Unknown or unsupported linux\n" ;;
esac



Loading…
Cancel
Save