diff --git a/Basic/script b/Basic/script new file mode 100644 index 0000000..c19bcbd --- /dev/null +++ b/Basic/script @@ -0,0 +1,25 @@ +#!/bin/bash +## SUSE doc: https://documentation.suse.com/sle-micro/5.2/html/SLE-Micro-all/cha-images-combustion.html +## Enable network +# combustion: network +## Post output on stdout +exec > >(exec tee -a /dev/tty0) 2>&1 +## Add password for root user +## SUSE documentation recommends openssl, mkpasswd works as well +echo 'root:$6$JAxNlqrZfAkaAOVA$.JXFR9pgjFj4FTuBEb7sPHjgG5Zs87lhnTP93p7iRetLTn9u3y2n0H1X/BdOeiXVG9P.fG3hq9BDJVGp/IERv0' | chpasswd -e +## Add ssh public key as authorized key for the root user +mkdir -pm700 /root/.ssh/ +cat adathor_node.pub >> /root/.ssh/authorized_keys +zypper ref +zypper dup -y --non-interactive +zypper --non-interactive install vim-small patterns-microos-cockpit bash-completion +## Enable services +systemctl enable cockpit.socket +systemctl enable sshd +## Print ip address on stdout +echo --- +echo "Welcome, you can reach me with cockpit or ssh on the following address:" +ip add | grep -o -E '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' +echo --- +echo "Configured with Combustion" > /etc/issue.d/combustion#!/bin/bash + diff --git a/script b/script deleted file mode 100644 index c19bcbd..0000000 --- a/script +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash -## SUSE doc: https://documentation.suse.com/sle-micro/5.2/html/SLE-Micro-all/cha-images-combustion.html -## Enable network -# combustion: network -## Post output on stdout -exec > >(exec tee -a /dev/tty0) 2>&1 -## Add password for root user -## SUSE documentation recommends openssl, mkpasswd works as well -echo 'root:$6$JAxNlqrZfAkaAOVA$.JXFR9pgjFj4FTuBEb7sPHjgG5Zs87lhnTP93p7iRetLTn9u3y2n0H1X/BdOeiXVG9P.fG3hq9BDJVGp/IERv0' | chpasswd -e -## Add ssh public key as authorized key for the root user -mkdir -pm700 /root/.ssh/ -cat adathor_node.pub >> /root/.ssh/authorized_keys -zypper ref -zypper dup -y --non-interactive -zypper --non-interactive install vim-small patterns-microos-cockpit bash-completion -## Enable services -systemctl enable cockpit.socket -systemctl enable sshd -## Print ip address on stdout -echo --- -echo "Welcome, you can reach me with cockpit or ssh on the following address:" -ip add | grep -o -E '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' -echo --- -echo "Configured with Combustion" > /etc/issue.d/combustion#!/bin/bash -