diff --git a/share/pkgs/services/supervisor/centos8/scripts/opennebula.sh b/share/pkgs/services/supervisor/centos8/scripts/opennebula.sh index b49bf143d8..690551368b 100755 --- a/share/pkgs/services/supervisor/centos8/scripts/opennebula.sh +++ b/share/pkgs/services/supervisor/centos8/scripts/opennebula.sh @@ -40,6 +40,7 @@ msg "Database is running - continue" for envfile in \ /var/run/one/ssh-agent.env \ + /etc/sysconfig/oned \ ; do if [ -f "$envfile" ] ; then diff --git a/src/mad/sh/create_container_image.sh b/src/mad/sh/create_container_image.sh index 2908f5f8ba..2f839c1ac6 100755 --- a/src/mad/sh/create_container_image.sh +++ b/src/mad/sh/create_container_image.sh @@ -46,7 +46,13 @@ esac #------------------------------------------------------------------------------- # Mount container disk image and untar rootfs contents to it #------------------------------------------------------------------------------- -mount $tmp_dir/$id.raw $tmp_dir/$id + +# try first to mount with the fuse2fs command and if that fails fallback to the +# regular mount +if ! fuse2fs -o noexec,nodev,nosuid $tmp_dir/$id.raw $tmp_dir/$id >/dev/null 2>&1 ; then + mount -o noexec,nodev,nosuid $tmp_dir/$id.raw $tmp_dir/$id +fi + chown $USER:$GROUP $tmp_dir/$id tar $untar_options $tmp_dir/$id.$extension -C $tmp_dir/$id > /dev/null 2>&1 diff --git a/src/mad/sh/create_docker_image.sh b/src/mad/sh/create_docker_image.sh index d0268bcb54..01e0d31e12 100755 --- a/src/mad/sh/create_docker_image.sh +++ b/src/mad/sh/create_docker_image.sh @@ -59,7 +59,13 @@ fi trap clean EXIT # Mount container disk image and untar rootfs contents to it -mount -o noexec,nodev,nosuid $img_raw $dockerdir/mnt > /dev/null 2>&1 + +# try first to mount with the fuse2fs command and if that fails fallback to the +# regular mount +if ! fuse2fs -o noexec,nodev,nosuid $img_raw $dockerdir/mnt >/dev/null 2>&1 ; then + mount -o noexec,nodev,nosuid $img_raw $dockerdir/mnt +fi + chmod o+w $dockerdir/mnt tar xpf $tarball -C $dockerdir/mnt > /dev/null 2>&1