manpage: update rename section; beadm: additional checks for arguments;
This commit is contained in:
parent
3664586858
commit
8179016b36
17
beadm
17
beadm
|
|
@ -201,6 +201,10 @@ case ${1} in
|
||||||
;;
|
;;
|
||||||
|
|
||||||
(activate) # ----------------------------------------------------------------
|
(activate) # ----------------------------------------------------------------
|
||||||
|
if [ ${#} -ne 2 ]
|
||||||
|
then
|
||||||
|
__usage
|
||||||
|
fi
|
||||||
__be_exist ${POOL}/ROOT/${2}
|
__be_exist ${POOL}/ROOT/${2}
|
||||||
if [ "${BOOTFS}" = "${POOL}/ROOT/${2}" ]
|
if [ "${BOOTFS}" = "${POOL}/ROOT/${2}" ]
|
||||||
then
|
then
|
||||||
|
|
@ -273,6 +277,10 @@ EOF
|
||||||
;;
|
;;
|
||||||
|
|
||||||
(destroy) # ----------------------------------------------------------------
|
(destroy) # ----------------------------------------------------------------
|
||||||
|
if [ ${#} -ne 2 ]
|
||||||
|
then
|
||||||
|
__usage
|
||||||
|
fi
|
||||||
__be_exist ${POOL}/ROOT/${2}
|
__be_exist ${POOL}/ROOT/${2}
|
||||||
if [ "${BOOTFS}" = "${POOL}/ROOT/${2}" ]
|
if [ "${BOOTFS}" = "${POOL}/ROOT/${2}" ]
|
||||||
then
|
then
|
||||||
|
|
@ -321,7 +329,16 @@ EOF
|
||||||
;;
|
;;
|
||||||
|
|
||||||
(rename) # ------------------------------------------------------------------
|
(rename) # ------------------------------------------------------------------
|
||||||
|
if [ ${#} -ne 2 ]
|
||||||
|
then
|
||||||
|
__usage
|
||||||
|
fi
|
||||||
__be_exist ${POOL}/ROOT/${2}
|
__be_exist ${POOL}/ROOT/${2}
|
||||||
|
if [ "${BOOTFS}" = "${POOL}/ROOT/${2}" ]
|
||||||
|
then
|
||||||
|
echo "ERROR: Renaming the active BE is not supported"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
if zfs list -H -o name ${POOL}/ROOT/${3} 2> /dev/null
|
if zfs list -H -o name ${POOL}/ROOT/${3} 2> /dev/null
|
||||||
then
|
then
|
||||||
echo "ERROR: Boot environment '${3}' already exists"
|
echo "ERROR: Boot environment '${3}' already exists"
|
||||||
|
|
|
||||||
2
beadm.1
2
beadm.1
|
|
@ -94,7 +94,7 @@ Displays all boot environments.
|
||||||
.Pp
|
.Pp
|
||||||
.It Ic rename Ao Ar origBeName Ac Ao Ar newBeName Ac
|
.It Ic rename Ao Ar origBeName Ac Ao Ar newBeName Ac
|
||||||
.Pp
|
.Pp
|
||||||
Renames the given
|
Renames the given nonactive
|
||||||
.Ar origBeName
|
.Ar origBeName
|
||||||
to the given
|
to the given
|
||||||
.Ar newBeName
|
.Ar newBeName
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue