From a76a1361b4fc5afc2029c8f54bae9e85e7af8a5c Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Mon, 10 Mar 2025 13:48:53 -0700 Subject: [PATCH] script/setup_host_fedora.sh: remove -p from mkdir 1. There is no need to have -p option in mkdir here, since /home/rootless was already created by useradd above. 2. When there is no -p, there is no need to suppress the shellcheck warning (which looked like this): > In script/setup_host_fedora.sh line 21: > mkdir -m 0700 -p /home/rootless/.ssh > ^-- SC2174 (warning): When used with -p, -m only applies to the deepest directory. Signed-off-by: Kir Kolyshkin --- script/setup_host_fedora.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/script/setup_host_fedora.sh b/script/setup_host_fedora.sh index c5744324d..7a1cfa7a0 100755 --- a/script/setup_host_fedora.sh +++ b/script/setup_host_fedora.sh @@ -18,8 +18,7 @@ useradd -u2000 -m -d/home/rootless -s/bin/bash rootless # Allow root and rootless itself to execute `ssh rootless@localhost` in tests/rootless.sh ssh-keygen -t ecdsa -N "" -f /root/rootless.key -# shellcheck disable=SC2174 -mkdir -m 0700 -p /home/rootless/.ssh +mkdir -m 0700 /home/rootless/.ssh cp /root/rootless.key /home/rootless/.ssh/id_ecdsa cat /root/rootless.key.pub >>/home/rootless/.ssh/authorized_keys chown -R rootless.rootless /home/rootless