fix broken sed escaping
This commit is contained in:
parent
6788a6e11d
commit
5c6ddee629
@ -92,7 +92,9 @@ sed -i "s/^CRYPTPASSWORD .*/CRYPTPASSWORD $LUKS_PASS/" install.conf
|
|||||||
|
|
||||||
# Update post-install.sh
|
# Update post-install.sh
|
||||||
sed -i "s/^ALMA_USER=.*/ALMA_USER=\"$USERNAME\"/" post-install.sh
|
sed -i "s/^ALMA_USER=.*/ALMA_USER=\"$USERNAME\"/" post-install.sh
|
||||||
sed -i "s|^SSH_KEY=.*|SSH_KEY=\"$SSH_KEY\"|" post-install.sh
|
# Use a different approach for SSH_KEY to handle special characters
|
||||||
|
escaped_key=$(printf '%s\n' "$SSH_KEY" | sed 's/[[\.*^$()+?{|]/\\&/g')
|
||||||
|
sed -i "s|^SSH_KEY=.*|SSH_KEY=\"$escaped_key\"|" post-install.sh
|
||||||
|
|
||||||
# Copy to root directory where installimage expects them
|
# Copy to root directory where installimage expects them
|
||||||
cp install.conf /root/
|
cp install.conf /root/
|
||||||
|
Loading…
Reference in New Issue
Block a user