Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
Brandon Schneider committed Aug 14, 2015
2 parents c69eb8d + 7f49567 commit 49bb509
Show file tree
Hide file tree
Showing 15 changed files with 953 additions and 738 deletions.
62 changes: 33 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,43 +48,47 @@ Start the jail:

**USAGE:**
- iocage activate ZPOOL
- iocage fetch [release=RELEASE | ftphost=ftp.hostname.org | ftpdir=/dir/ | ftpfiles="base.txz doc.txz lib32.txz src.txz"]
- iocage cap UUID|TAG
- iocage chroot UUID|TAG [command]
- iocage clean [-a|-r|-j]
- iocage clone UUID|TAG [UUID|TAG@snapshot] [property=value]
- iocage console UUID|TAG
- iocage create [-b|-c|-e] [release=RELEASE] [pkglist=file] [property=value]
- iocage clone UUID|TAG@snapshot [property=value]
- iocage destroy [-f] UUID|TAG|ALL
- iocage reset UUID|TAG|ALL
- iocage deactivate ZPOOL
- iocage defaults
- iocage destroy [-f] UUID|TAG
- iocage df
- iocage exec [-u username | -U username] UUID|TAG|ALL command [arg ...]
- iocage export UUID|TAG
- iocage fetch [release=RELEASE | ftphost=ftp.hostname.org | ftpdir=/dir/ |
ftpfiles="base.txz doc.txz lib32.txz src.txz"]
- iocage get property|all UUID|TAG
- iocage help
- iocage import UUID [property=value]
- iocage init-host IP ZPOOL
- iocage inuse UUID|TAG
- iocage limits [UUID|TAG]
- iocage list [-t|-r]
- iocage start UUID|TAG
- iocage stop UUID|TAG
- iocage restart UUID|TAG
- iocage package UUID|TAG
- iocage promote UUID|TAG
- iocage rcboot
- iocage rcshutdown
- iocage console UUID|TAG
- iocage exec [-u username | -U username] UUID|TAG command [arg ...]
- iocage chroot UUID|TAG [command]
- iocage df
- iocage show property
- iocage get property|all UUID|TAG
- iocage record start|stop UUID|TAG
- iocage reset UUID|TAG|ALL
- iocage restart UUID|TAG
- iocage rollback UUID|TAG@snapshotname
- iocage runtime UUID|TAG
- iocage set property=value UUID|TAG
- iocage cap UUID|TAG
- iocage limits UUID|TAG
- iocage uncap UUID|TAG
- iocage inuse [UUID|TAG]
- iocage snapshot UUID|TAG@snapshotname
- iocage show property
- iocage snaplist UUID|TAG
- iocage snapremove UUID|TAG@snapshotname|ALL
- iocage rollback UUID|TAG@snapshotname
- iocage promote UUID|TAG
- iocage runtime UUID|TAG
- iocage snapshot UUID|TAG [UUID|TAG@snapshotname]
- iocage start UUID|TAG
- iocage stop UUID|TAG
- iocage uncap UUID|TAG
- iocage update UUID|TAG
- iocage upgrade UUID|TAG
- iocage record start|stop UUID|TAG
- iocage package UUID|TAG
- iocage export UUID|TAG
- iocage import UUID [property=value]
- iocage defaults
- iocage version | --version
- iocage help
- iocage upgrade UUID|TAG [release=RELEASE]
- iocage version | --version

**REQUIREMENTS**
- FreeBSD 9.3-RELEASE amd64 or newer
Expand Down
14 changes: 10 additions & 4 deletions iocage
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ unset LANG
PATH=${PATH}:/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/usr/local/sbin

if [ "${1}" = "--version" -o "${1}" = "version" ] ; then
echo "iocage 1.7.1 (2015/08/04)"
echo "iocage 1.7.2 (2015/08/04)"
exit 0
fi

Expand All @@ -42,7 +42,7 @@ if [ "$(zpool list)" = 'no pools available' ] ; then
fi

if [ "$(uname -K)" -lt "903000" ]; then
echo " Unsupported RELEASE found. Please upgrade to 9.3-RELEASE or later."
echo " ERROR: Unsupported RELEASE found. Please upgrade to 9.3-RELEASE or later."
exit 1
fi

Expand Down Expand Up @@ -85,11 +85,17 @@ if [ "$1" == "help" ] ; then
exit 0
fi

if [ "$(whoami)" != "root" ] ; then
echo "* Only root can manage jails!"
if [ ! __readonly_cmd $1 -a "$(whoami)" != "root" ] ; then
echo "* The $1 command needs root credentials!"
exit 1
fi

# Did not work when included as an OR below, workaround for that
if [ "$1" == "deactivate" ] ; then
shift
__deactivate "$1"
fi

# work around zpool activation chicken-egg problem
# (when activating a pool don't look for an existing one)
if [ "$1" != "activate" ] ; then
Expand Down
Loading

0 comments on commit 49bb509

Please sign in to comment.