Compare commits
2 Commits
master
...
dev/autopr
Author | SHA1 | Date |
---|---|---|
|
c96f3918b4 | |
|
0f091f9dfe |
|
@ -1,16 +1,16 @@
|
|||
%post
|
||||
cat > /root/.ssh/authorized_keys <<EOF
|
||||
expiry-time="$(date -d +1hour +%Y%m%d%H%M)",restrict,pty ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICoOO/ZYMxRgmyvqZwGN3NM5pHyh3NBdC7iZrXIopt93 Host Provisioner
|
||||
EOF
|
||||
|
||||
cat > /usr/local/libexec/notify-online.sh <<'EOF'
|
||||
{% include "notify-online.sh" %}
|
||||
EOF
|
||||
chmod +x /usr/local/libexec/notify-online.sh
|
||||
|
||||
cat > /etc/systemd/system/notify-online.service <<'EOF'
|
||||
{% include "notify-online.service" %}
|
||||
EOF
|
||||
|
||||
systemctl enable --no-reload notify-online.service
|
||||
%packages
|
||||
dch-autoprovision
|
||||
%end
|
||||
|
||||
%post
|
||||
{
|
||||
ls -la /root/.ssh
|
||||
chmod -R 700 /root/.ssh
|
||||
cat /root/.ssh/authorized_keys
|
||||
systemctl enable --no-reload notify-online.service
|
||||
sed -i 's/.*ForwardToConsole.*/ForwardToConsole=yes/' /etc/systemd/journald.conf
|
||||
grep ForwardTo /etc/systemd/journald.conf
|
||||
passwd -d root
|
||||
exit 0
|
||||
} > /dev/console
|
||||
%end
|
||||
|
|
Loading…
Reference in New Issue