Merge branch 'master' of code.ungleich.ch:ungleich-public/ungleich-tools
This commit is contained in:
commit
2ef8e21847
2 changed files with 12 additions and 3 deletions
|
@ -1,12 +1,16 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# Nico Schottelius, 2019-12-09
|
# Nico Schottelius, 2019-12-09
|
||||||
|
# the ugly code is llnu
|
||||||
|
|
||||||
|
#this can only run in the ungleich-tools directory because of the cat magiccommand........
|
||||||
|
|
||||||
if [ $# -ne 1 ]; then
|
if [ $# -ne 1 ]; then
|
||||||
echo $0 suite
|
echo $0 suite # rootpw
|
||||||
echo suite is for instance ascii, beowulf, etc
|
echo suite is for instance ascii, beowulf, etc
|
||||||
|
# echo rootpw: set root password
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
#pw=$2
|
||||||
suite=$1; shift
|
suite=$1; shift
|
||||||
|
|
||||||
date=$(date +%F)
|
date=$(date +%F)
|
||||||
|
@ -16,6 +20,7 @@ kernel=${dir}-kernel
|
||||||
keyurl=https://code.ungleich.ch/ungleich-public/__ungleich_staff_ssh_access/raw/master/files
|
keyurl=https://code.ungleich.ch/ungleich-public/__ungleich_staff_ssh_access/raw/master/files
|
||||||
|
|
||||||
debootstrap "${suite}" "${dir}"
|
debootstrap "${suite}" "${dir}"
|
||||||
|
|
||||||
chroot ${dir} apt install -y openssh-server rdnssd linux-image-amd64
|
chroot ${dir} apt install -y openssh-server rdnssd linux-image-amd64
|
||||||
|
|
||||||
cat > ${dir}/etc/network/interfaces << EOF
|
cat > ${dir}/etc/network/interfaces << EOF
|
||||||
|
@ -27,7 +32,9 @@ iface eth0 inet6 auto
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
cp ${dir}/boot/vmlinuz-* ${kernel}
|
cp ${dir}/boot/vmlinuz-* ${kernel}
|
||||||
#rm ${dir}/boot/initrd*
|
|
||||||
|
echo '* * * * * root ip -o -6 addr show | grep -E -v "lo|one" > /etc/issue' > ${dir}/etc/cron.d/ipv6addr
|
||||||
|
|
||||||
mkdir -p ${dir}/root/.ssh
|
mkdir -p ${dir}/root/.ssh
|
||||||
|
|
||||||
for key in balazs dominique jinguk nico; do
|
for key in balazs dominique jinguk nico; do
|
||||||
|
|
2
magiccommand
Executable file
2
magiccommand
Executable file
|
@ -0,0 +1,2 @@
|
||||||
|
* * * * * root ip -o -6 addr show | grep -E -v "lo |one" | awk '{print $1" " $2": "$4}' >> /dev/tty1
|
||||||
|
|
Loading…
Reference in a new issue