Mercurial > hgrepos > FreeBSD > ports > sysutils > local-bsdtools
comparison sbin/ftjail @ 292:d40e6e40c315
Comments
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Sun, 18 Sep 2022 14:10:40 +0200 |
| parents | a6c9eb25ae81 |
| children | 73ac6bec36fe |
comparison
equal
deleted
inserted
replaced
| 291:f2b4edf5f6a3 | 292:d40e6e40c315 |
|---|---|
| 771 # Determine the relative name of the dataset | 771 # Determine the relative name of the dataset |
| 772 _relative_name="${_name#${_ds_source}}" | 772 _relative_name="${_name#${_ds_source}}" |
| 773 _relative_name="${_relative_name%@*}" | 773 _relative_name="${_relative_name%@*}" |
| 774 echo " -> $_relative_name" | 774 echo " -> $_relative_name" |
| 775 if [ -z "${_relative_name}" ]; then | 775 if [ -z "${_relative_name}" ]; then |
| 776 # root | 776 # |
| 777 # Root | |
| 778 # | |
| 777 if [ "${_opt_symlink}" = "yes" ]; then | 779 if [ "${_opt_symlink}" = "yes" ]; then |
| 778 _root_canmount="${_opt_canmount}" | 780 _root_canmount="${_opt_canmount}" |
| 779 else | 781 else |
| 780 _root_canmount="-o canmount=off" | 782 _root_canmount="-o canmount=off" |
| 781 fi | 783 fi |
| 783 zfs send -Lec -p -v "${_name}" | zfs receive ${_opt_nomount} -v ${_root_canmount} -o "mountpoint=${_opt_mountpoint}" "${_ds_target}${_relative_name}" | 785 zfs send -Lec -p -v "${_name}" | zfs receive ${_opt_nomount} -v ${_root_canmount} -o "mountpoint=${_opt_mountpoint}" "${_ds_target}${_relative_name}" |
| 784 else | 786 else |
| 785 zfs send -Lec -p -v "${_name}" | zfs receive ${_opt_nomount} -v ${_root_canmount} -x mountpoint "${_ds_target}${_relative_name}" | 787 zfs send -Lec -p -v "${_name}" | zfs receive ${_opt_nomount} -v ${_root_canmount} -x mountpoint "${_ds_target}${_relative_name}" |
| 786 fi | 788 fi |
| 787 else | 789 else |
| 788 # child | 790 # |
| 791 # Children | |
| 792 # | |
| 789 if [ "${_relative_name}" = "/usr" ]; then | 793 if [ "${_relative_name}" = "/usr" ]; then |
| 790 zfs send -Lec -p -v "${_name}" | zfs receive ${_opt_nomount} -v -o canmount=off -x mountpoint "${_ds_target}${_relative_name}" | 794 zfs send -Lec -p -v "${_name}" | zfs receive ${_opt_nomount} -v -o canmount=off -x mountpoint "${_ds_target}${_relative_name}" |
| 791 else | 795 else |
| 792 zfs send -Lec -p -v "${_name}" | zfs receive ${_opt_nomount} -v ${_opt_canmount} -x mountpoint "${_ds_target}${_relative_name}" | 796 zfs send -Lec -p -v "${_name}" | zfs receive ${_opt_nomount} -v ${_opt_canmount} -x mountpoint "${_ds_target}${_relative_name}" |
| 793 fi | 797 fi |
