Merge claude/2
This commit is contained in:
commit
a42f2c6618
@ -4,7 +4,7 @@ checkDockerRootlessRequirement()
|
||||
{
|
||||
if [[ $CFG_DOCKER_INSTALL_TYPE == "rootless" ]]; then
|
||||
### Docker Rootless
|
||||
if grep -q "ROOTLESS" $sysctl; then
|
||||
if grep -qs "ROOTLESS" $sysctl; then
|
||||
isSuccessful "Docker Rootless appears to be installed."
|
||||
else
|
||||
isNotice "Docker Rootless does not appear to be installed."
|
||||
|
||||
@ -31,7 +31,7 @@ checkInstallTypeRequirement()
|
||||
ISACT=$( (runSystem systemctl is-active docker ) 2>&1 )
|
||||
elif [[ $CFG_DOCKER_INSTALL_TYPE == "rootless" ]]; then
|
||||
# Used for checking the rootless user
|
||||
local ISUSER=$( (id -u "$CFG_DOCKER_INSTALL_USER"))
|
||||
local ISUSER=$( (id -u "$CFG_DOCKER_INSTALL_USER") 2>&1 )
|
||||
if [[ "$ISUSER" == *"no such user"* ]]; then
|
||||
ISACT=$(command -v docker &> /dev/null)
|
||||
fi
|
||||
|
||||
@ -53,7 +53,7 @@ installDockerRootless()
|
||||
echo ""
|
||||
echo "---- $menu_number. Updating the sysctl file for Updating Debian 10."
|
||||
echo ""
|
||||
if sudo grep -q "kernel.unprivileged_userns_clone=1" $sysctl; then
|
||||
if sudo grep -qs "kernel.unprivileged_userns_clone=1" $sysctl; then
|
||||
isNotice "kernel.unprivileged_userns_clone=1 already exists in $sysctl"
|
||||
else
|
||||
local result=$(echo "kernel.unprivileged_userns_clone=1" | sudo tee -a $sysctl > /dev/null)
|
||||
@ -181,7 +181,7 @@ EOL"
|
||||
echo ""
|
||||
|
||||
# Update sysctl file
|
||||
if ! grep -qF "# DOCKER ROOTLESS SYSCTL START" "$sysctl"; then
|
||||
if ! grep -qsF "# DOCKER ROOTLESS SYSCTL START" "$sysctl"; then
|
||||
|
||||
local result=$(echo '# DOCKER ROOTLESS SYSCTL START' | sudo tee -a "$sysctl" > /dev/null)
|
||||
checkSuccess "Adding rootless header to sysctl"
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
installDockerRootlessStartSetup()
|
||||
{
|
||||
if sudo grep -q "ROOTLESS" $sysctl; then
|
||||
if sudo grep -qs "ROOTLESS" $sysctl; then
|
||||
isSuccessful "Docker Rootless appears to be installed."
|
||||
else
|
||||
installDockerRootless;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user