diff --git a/src/func/chroot b/src/func/chroot old mode 100644 new mode 100755 index 720a5e8..26de25e --- a/src/func/chroot +++ b/src/func/chroot @@ -1,3 +1,7 @@ +#!/bin/bash +#remaster lib +[ -d "" ] || { echo "LIBDIR not exist"; exit 1; } + ## overload chroot with lxc function chroot() { lxc-attach -n _remaster_ -- "$2" "$3" "$4" "$5" "$6" "$7" @@ -21,3 +25,8 @@ function chroot_config() { echo "lxc.network.flags = up" echo "lxc.network.hwaddr = 00:16:3e:5a:ba:1e" } + +[ -n "$1" ] && { + echo param + $1 +} diff --git a/src/remaster.sh b/src/remaster.sh index 75b0ebb..8663194 100755 --- a/src/remaster.sh +++ b/src/remaster.sh @@ -566,6 +566,9 @@ function iso_create_desinfect2017() { ### chroot ### +## overload chroot with lxc +source /func/chroot + #chroot_initial [chroot_dir] source /func/chroot_initial