mirror of
https://github.com/opencontainers/runc.git
synced 2025-10-05 15:37:02 +08:00
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 <kolyshkin@gmail.com>
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user