Skip to content

Commit a76a136

Browse files
committed
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 <[email protected]>
1 parent af386d1 commit a76a136

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

script/setup_host_fedora.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ useradd -u2000 -m -d/home/rootless -s/bin/bash rootless
1818

1919
# Allow root and rootless itself to execute `ssh rootless@localhost` in tests/rootless.sh
2020
ssh-keygen -t ecdsa -N "" -f /root/rootless.key
21-
# shellcheck disable=SC2174
22-
mkdir -m 0700 -p /home/rootless/.ssh
21+
mkdir -m 0700 /home/rootless/.ssh
2322
cp /root/rootless.key /home/rootless/.ssh/id_ecdsa
2423
cat /root/rootless.key.pub >>/home/rootless/.ssh/authorized_keys
2524
chown -R rootless.rootless /home/rootless

0 commit comments

Comments
 (0)