Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/ioc-common
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ __cleanup_release_dir () {
if [ -n "${_dwn_rel_exist}" ] ; then
_dwn_dir_exist=$(zfs get -H -o value mountpoint \
${pool}/iocell/download/${_rel_name})
zfs destroy -fr -- ${pool}${iocroot}/download/${_rel_name}
zfs destroy -fr -- ${pool}/iocell/download/${_rel_name}
if [ -d "${_dwn_dir_exist}" ]; then
rm -rf -- ${_dwn_dir_exist}
fi
Expand Down
2 changes: 1 addition & 1 deletion lib/ioc-configure
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ __configure_jail () {
fi

if [ -z "${_dataset}" ] ; then
_dataset="${pool}${_mountpoint}"
_dataset="${pool}/iocell/jails/${_fulluuid}"
fi

__ucl_set "${_mountpoint}" "${_prop_name}" "${_value}" "1"
Expand Down
4 changes: 2 additions & 2 deletions lib/ioc-git
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ __fetch_plugin () {
# does not exist yet.
if [ -d "${iocroot}/releases/${_release}" ] ; then
if [ -z "$(ls -A ${iocroot}/releases/${_release}/root)" ] ; then
zfs destroy "${iocroot}/releases/${_release}"
zfs destroy "${pool}/iocell/releases/${_release}"
fi
fi

Expand Down Expand Up @@ -134,7 +134,7 @@ __fetch_plugin () {
if [ "${_branch_rel}" != "${_release}" ] ; then
if [ -d "${iocroot}/releases/${_branch_rel}" ] ; then
if [ -z "$(ls -A ${iocroot}/releases/${_branch_rel}/root)" ] ; then
zfs destroy "${iocroot}/releases/${_branch_rel}"
zfs destroy "${pool}/iocell/releases/${_branch_rel}"
fi
fi

Expand Down
2 changes: 1 addition & 1 deletion lib/ioc-globals
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ wallclock="off"

# Custom properties
pool="none"
iocroot=/iocell
iocroot="usr/local/iocell"
tag=$(date "+%F@%T")
istemplate="no"
bpf="off"
Expand Down
4 changes: 2 additions & 2 deletions lib/ioc-hacks
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ __hack88_mount () {
if [ "${_hack88}" = "1" ] && [ "${_mount_len}" -eq "37" ] && [ "${_template}" = "no" ]; then
__unlink_tag $_dataset
echo " INFO: truncating jail mountpoint"
zfs umount -f "${iocroot}/jails/${_fulluuid}"
zfs umount -f "${pool}/iocell/jails/${_fulluuid}"
zfs set mountpoint="${iocroot}/jails/${_shortuuid}" "${_dataset}"
zfs list -rH -o name "${pool}/iocell/jails/${_fulluuid}" | \
egrep -v "${_jail_zfs_dataset_re}" | xargs -L 1 zfs mount
Expand All @@ -36,7 +36,7 @@ __hack88_mount () {
elif [ "${_hack88}" != "1" ] && [ "${_mount_len}" -lt "37" ] && [ "${_template}" = "no" ] ; then
__unlink_tag "${_dataset}"
echo " INFO: restoring jail mountpoint"
zfs umount -f "${iocroot}/jails/${_shortuuid}"
zfs umount -f "${pool}/iocell/jails/${_shortuuid}"
zfs set mountpoint="${iocroot}/jails/${_fulluuid}" "${_dataset}"
zfs list -rH -o name "${pool}/iocell/jails/${_fulluuid}" | \
egrep -v "${_jail_zfs_dataset_re}" | xargs -L 1 zfs mount
Expand Down
22 changes: 11 additions & 11 deletions lib/ioc-zfs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ __activate () {
# active pools.
for _fs in ${_filesystems} ; do
if [ "${_fs}" = "iocell" ] ; then
zfs set mountpoint="/${_fs}" "${pool}/${_fs}" > /dev/null 2>&1
zfs set mountpoint="/usr/local/${_fs}" "${pool}/${_fs}" > /dev/null 2>&1
else
zfs inherit -r mountpoint "${pool}/${_fs}" > /dev/null 2>&1
fi
Expand Down Expand Up @@ -951,23 +951,23 @@ __check_filesystems () {
zfs create -p "${pool}/${_fs}"

if [ "${_fs}" = "iocell" ] ; then
zfs set mountpoint="/${_fs}" "${pool}/${_fs}" \
zfs set mountpoint="/usr/local/${_fs}" "${pool}/${_fs}" \
> /dev/null 2>&1
fi

if [ "${_altroot}" != "-" -a ! -d "/iocell" ] ; then
if [ "${_altroot}" != "-" -a ! -d "/usr/local/iocell" ] ; then
sed -i '' s#.*iocroot.*#iocroot="${_altroot}/iocell"# \
"${LIB}/ioc-globals"
export iocroot="${_altroot}/iocell"
elif [ "${_altroot}" = "/mnt" -a -d "/iocell" ] ; then
elif [ "${_altroot}" = "/mnt" -a -d "/usr/local/iocell" ] ; then
# we're in a chroot.
sed -i '' s#.*iocroot.*#iocroot="/iocell"# \
sed -i '' s#.*iocroot.*#iocroot="/usr/local/iocell"# \
"${LIB}/ioc-globals"
export iocroot="${_altroot}/iocell"
elif [ "${_altroot}" = "-" ] ; then
sed -i '' s#.*iocroot.*#iocroot="/iocell"# \
sed -i '' s#.*iocroot.*#iocroot="/usr/local/iocell"# \
"${LIB}/ioc-globals"
export iocroot="/iocell"
export iocroot="/usr/local/iocell"
fi
fi
fi
Expand All @@ -985,7 +985,7 @@ __check_filesystems () {
# Checks to see if the user changed the altroot and modify ioc-globals
# If the user decided to unset their altroot, they need to run again as
# root to set it back to the default location
if [ "${_altroot}" != "-" ] && [ "$(id -un)" = "root" ] && [ ! -d "/iocell" ] ; then
if [ "${_altroot}" != "-" ] && [ "$(id -un)" = "root" ] && [ ! -d "/usr/local/iocell" ] ; then
sed -i '' s#.*iocroot.*#iocroot="${_altroot}/iocell"# \
"${LIB}/ioc-globals"
export iocroot="${_altroot}/iocell"
Expand All @@ -995,11 +995,11 @@ __check_filesystems () {
echo " Please run as root to fix." >&2
exit 1
elif [ "${_altroot}" = "-" ] && [ "$(id -un)" = "root" ] ; then
sed -i '' s#.*iocroot.*#iocroot="/iocell"# \
sed -i '' s#.*iocroot.*#iocroot="/usr/local/iocell"# \
"${LIB}/ioc-globals"
export iocroot="/iocell"
export iocroot="/usr/local/iocell"
elif [ "${_altroot}" = "-" ] && [ "$(id -un)" != "root" ] && \
[ "${iocroot}" != "/iocell" ] ; then
[ "${iocroot}" != "/usr/local/iocell" ] ; then
__error "You changed the altroot of ${pool}"
echo " Please run as root to fix." >&2
exit 1
Expand Down