disable nfs and copy ssh public keys to container
This commit is contained in:
@@ -69,6 +69,7 @@ fi
|
||||
|
||||
# configure the services of the host by building the host overlay
|
||||
echo "-- Running wwctl --"
|
||||
wwctl overlay build
|
||||
# enable tftp if systemd is running
|
||||
test -e /run/systemd/system && wwctl configure tftp
|
||||
test -e /run/systemd/system && wwctl configure ssh
|
||||
wwctl overlay build
|
||||
|
||||
@@ -12,7 +12,8 @@ OVERLAYDIR=/var/lib/warewulf/overlays
|
||||
CHROOTDIR=/var/lib/warewulf/chroots
|
||||
CONTAINERDIR=/var/lib/warewulf/container
|
||||
WAREWULFCONF=/etc/warewulf
|
||||
BASHCOMPLETION=/usr/share/bash_completion/completions/wwctl
|
||||
BASHCOMPLETION=/usr/share/bash_completion/completions/w*
|
||||
AUTHKEYDIR=/root/.ssh
|
||||
|
||||
echo "LABEL INSTALL"
|
||||
# ensure all scripts will be present on the host
|
||||
@@ -67,10 +68,15 @@ sync_dir $CHROOTDIR
|
||||
sync_dir $WAREWULFCONF
|
||||
|
||||
# bash completion
|
||||
if [ ! -e /host/etc/bash_completion.d/wwctl ] ; then
|
||||
if [ ! -e /host/etc/bash_completion.d/warewulf ] ; then
|
||||
mkdir -p /host/etc/bash_completion.d
|
||||
cp $BASHCOMPLETION /host/etc/bash_completion.d/
|
||||
fi
|
||||
|
||||
# containerdir
|
||||
mkdir -p /host/$CONTAINERDIR
|
||||
|
||||
# authorized keys
|
||||
mkdir -p /root/.ssh/
|
||||
echo "Copy authorized keys to container"
|
||||
test -e /host/${AUTHKEYDIR}/*pub && cp -v /host/${AUTHKEYDIR}/*pub ${AUTHKEYDIR} || echo "no public keys found"
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#!/bin/bash
|
||||
OVERLAYDIR=/var/lib/warewulf/overlays
|
||||
CHROOTDIR=/var/lib/warewulf/chroots
|
||||
OCIDIR=/var/lib/warewulf/oci
|
||||
CONTAINERDIR=/var/lib/warewulf/container
|
||||
WAREWULFCONF=/etc/warewulf
|
||||
BASEDIR=/var/lib/warewulf
|
||||
@@ -28,6 +29,6 @@ while true ; do
|
||||
done
|
||||
echo "PURGING"
|
||||
/container/label-uninstall
|
||||
rm -rv /host/$WAREWULFCONF /host/$OVERLAYDIR /host/$CHROOTDIR /host/$CONTAINERDIR
|
||||
rm -rv /host/$WAREWULFCONF /host/$OVERLAYDIR /host/$CHROOTDIR /host/$CONTAINERDIR /host/$OCIDIR
|
||||
rmdir /host/$BASEDIR
|
||||
|
||||
|
||||
Reference in New Issue
Block a user