Skip to content

Commit

Permalink
Fix syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
peterjaap committed Mar 2, 2025
1 parent c4841a3 commit b604968
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions autoinstall.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -120,15 +120,11 @@ autoinstall:
#- curtin in-target --target=/target -- gnome-extensions enable [email protected]
#- curtin in-target --target=/target -- gnome-extensions enable [email protected]

- curtin in-target --target=/target -- bash -c '
USERNAME=$(getent passwd 1000 | cut -d\':\' -f1);
USER_HOME="/home/$USERNAME";
echo "Detected user $USERNAME";'

# Generate SSH key
- curtin in-target --target=/target -- bash -c '
USERNAME=$(getent passwd 1000 | cut -d: -f1);
USERNAME=$(getent passwd 1000 | cut -d':' -f1);
USER_HOME="/home/$USERNAME";
echo "Detected user $USERNAME";
if [ -d "$USER_HOME" ]; then
sudo -u $USERNAME mkdir -p "$USER_HOME/.ssh";
sudo -u $USERNAME ssh-keygen -t rsa -b 4096 -C "[email protected]" -f "$USER_HOME/.ssh/id_rsa" -N "";
Expand Down

0 comments on commit b604968

Please sign in to comment.