comparison sbin/fjail @ 445:0159c8453fa2

Rename recently moved functions: _get_dataset... -> _get_zfs_dataset...
author Franz Glasner <fzglas.hg@dom66.de>
date Mon, 06 May 2024 09:32:14 +0200
parents 84e43d1bd128
children f6f64fd6f17b
comparison
equal deleted inserted replaced
444:84e43d1bd128 445:0159c8453fa2
578 # 578 #
579 # Handle <mountpoint>/var/empty specially: 579 # Handle <mountpoint>/var/empty specially:
580 # make it writeable temporarily if it is mounted read-only: 580 # make it writeable temporarily if it is mounted read-only:
581 # 581 #
582 _vestatus="" 582 _vestatus=""
583 _veds="$(_get_dataset_for_varempty "${_mp}")" 583 _veds="$(_get_zfs_dataset_for_varempty "${_mp}")"
584 if [ $? -eq 0 ]; then 584 if [ $? -eq 0 ]; then
585 _vestatus=$(zfs list -H -o readonly -t filesystem ${_veds} 2>/dev/null) || { echo "ERROR: cannot determine readonly status of ${_mp}/var/empty" >&2; return 1; } 585 _vestatus=$(zfs list -H -o readonly -t filesystem ${_veds} 2>/dev/null) || { echo "ERROR: cannot determine readonly status of ${_mp}/var/empty" >&2; return 1; }
586 if [ "${_vestatus}" = "on" ]; then 586 if [ "${_vestatus}" = "on" ]; then
587 zfs set readonly=off ${_veds} 1> /dev/null || { echo "ERROR: cannot reset readonly-status of ${_mp}/var/empty" >&2; return 1; } 587 zfs set readonly=off ${_veds} 1> /dev/null || { echo "ERROR: cannot reset readonly-status of ${_mp}/var/empty" >&2; return 1; }
588 fi 588 fi