Allow zfs jail and zfs unjail to use both jailnames and jailid
Reviewed by: pjd MFC after: 1 month
This commit is contained in:
parent
6483d5a592
commit
ec6ddea1a8
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=240696
@ -256,10 +256,10 @@
|
|||||||
.Op Ar snapshot Ns | Ns Ar filesystem
|
.Op Ar snapshot Ns | Ns Ar filesystem
|
||||||
.Nm
|
.Nm
|
||||||
.Cm jail
|
.Cm jail
|
||||||
.Ar jailid filesystem
|
.Ar jailid Ns | Ns Ar jailname filesystem
|
||||||
.Nm
|
.Nm
|
||||||
.Cm unjail
|
.Cm unjail
|
||||||
.Ar jailid filesystem
|
.Ar jailid Ns | Ns Ar jailname filesystem
|
||||||
.Sh DESCRIPTION
|
.Sh DESCRIPTION
|
||||||
The
|
The
|
||||||
.Nm
|
.Nm
|
||||||
|
@ -6300,9 +6300,9 @@ do_jail(int argc, char **argv, int attach)
|
|||||||
usage(B_FALSE);
|
usage(B_FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
jailid = atoi(argv[1]);
|
jailid = jail_getid(argv[1]);
|
||||||
if (jailid == 0) {
|
if (jailid < 0) {
|
||||||
(void) fprintf(stderr, gettext("invalid jailid\n"));
|
(void) fprintf(stderr, gettext("invalid jail id or name\n"));
|
||||||
usage(B_FALSE);
|
usage(B_FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,8 +21,8 @@ CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/fs/zfs
|
|||||||
CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/sys
|
CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/sys
|
||||||
CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/common/zfs
|
CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/common/zfs
|
||||||
|
|
||||||
DPADD= ${LIBGEOM} ${LIBNVPAIR} ${LIBUMEM} \
|
DPADD= ${LIBGEOM} ${LIBJAIL} ${LIBNVPAIR} ${LIBUMEM} \
|
||||||
${LIBUTIL} ${LIBUUTIL} ${LIBZFS}
|
${LIBUTIL} ${LIBUUTIL} ${LIBZFS}
|
||||||
LDADD= -lgeom -lnvpair -lumem -lutil -luutil -lzfs
|
LDADD= -lgeom -ljail -lnvpair -lumem -lutil -luutil -lzfs
|
||||||
|
|
||||||
.include <bsd.prog.mk>
|
.include <bsd.prog.mk>
|
||||||
|
Loading…
Reference in New Issue
Block a user