Mini Shell
#!/usr/bin/bash
# Copyright © Cloud Linux GmbH & Cloud Linux Software, Inc 2010-2021 All Rights Reserved
#
# Licensed under CLOUD LINUX LICENSE AGREEMENT
# http://cloudlinux.com/docs/LICENSE.TXT
# Note: Also called from Debian
# Arguments:
# RPM
# $1 == 1 - install package
# $1 == 2 - upgrade package
# DEB
# $1 == configure - RPM post/posttrans
# "liblve POST INSTALL STARTED"
rhel=$2 # 0%{?rhel}
available_flags_dir=/opt/cloudlinux/flags/available-flags.d
disable_cagefs_restricted_caps_flag=disable-cagefs-restricted-caps.flag
disable_no_new_privs_flag=disable-cagefs-no-new-privs.flag
if [[ "$1" -eq "1" || "$1" == "install" ]]; then
mkdir -p "${available_flags_dir}"
echo 'description: "Disiable restricting capabilities in cagefs"' \
> "${available_flags_dir}/${disable_cagefs_restricted_caps_flag}"
if [[ "$rhel" -gt 7 ]]; then
echo 'description: "Disable setting NoNewPrivs in cagefs"' \
> "${available_flags_dir}/${disable_no_new_privs_flag}"
fi
fi
# "liblve POST INSTALL FINISHED"
Zerion Mini Shell 1.0