prepend out-dir for building image
This commit is contained in:
parent
2ef8e21847
commit
b549e1059d
1 changed files with 9 additions and 7 deletions
|
@ -4,19 +4,21 @@
|
|||
|
||||
#this can only run in the ungleich-tools directory because of the cat magiccommand........
|
||||
|
||||
if [ $# -ne 1 ]; then
|
||||
echo $0 suite # rootpw
|
||||
if [ $# -ne 2 ]; then
|
||||
echo $0 suite out-directory
|
||||
echo out-directory: into which directory to place resulting files
|
||||
echo suite is for instance ascii, beowulf, etc
|
||||
# echo rootpw: set root password
|
||||
exit 1
|
||||
fi
|
||||
#pw=$2
|
||||
|
||||
suite=$1; shift
|
||||
outdir=$1; shift
|
||||
|
||||
date=$(date +%F)
|
||||
|
||||
dir=${suite}-${date}
|
||||
dir=${outdir}/${suite}-${date}
|
||||
kernel=${dir}-kernel
|
||||
initramfs=${dir}-initramfs
|
||||
keyurl=https://code.ungleich.ch/ungleich-public/__ungleich_staff_ssh_access/raw/master/files
|
||||
|
||||
debootstrap "${suite}" "${dir}"
|
||||
|
@ -33,7 +35,7 @@ EOF
|
|||
|
||||
cp ${dir}/boot/vmlinuz-* ${kernel}
|
||||
|
||||
echo '* * * * * root ip -o -6 addr show | grep -E -v "lo|one" > /etc/issue' > ${dir}/etc/cron.d/ipv6addr
|
||||
echo '* * * * * root ip -o -6 addr show | grep -E -v 'lo |one' > /etc/issue' > ${dir}/etc/cron.d/ipv6addr
|
||||
|
||||
mkdir -p ${dir}/root/.ssh
|
||||
|
||||
|
@ -46,4 +48,4 @@ done
|
|||
# in our case, they are just the same
|
||||
ln -s /sbin/init ${dir}/init
|
||||
|
||||
( cd ${dir} ; find . | cpio -H newc -o | gzip -9 > ../${dir}-initramfs )
|
||||
( cd ${dir} ; find . | cpio -H newc -o | gzip -9 > ${initramfs} )
|
||||
|
|
Loading…
Reference in a new issue