summaryrefslogtreecommitdiffstats
path: root/ship/src
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2013-11-13 00:47:58 +0100
committermakefu <github@syntax-fehler.de>2013-11-13 00:47:58 +0100
commitf09880150c6a309ce15931a8e2d52ebf054a115a (patch)
treee5f36524d17061c4ca1337c9cc386712e8e8ade4 /ship/src
parent8b60dff25e85921fe533f621a1b5d0f8149bf38f (diff)
fix remaster_iso for krebs auto install
Diffstat (limited to 'ship/src')
-rwxr-xr-xship/src/remaster_iso28
1 files changed, 24 insertions, 4 deletions
diff --git a/ship/src/remaster_iso b/ship/src/remaster_iso
index a10034c9..c11f1f57 100755
--- a/ship/src/remaster_iso
+++ b/ship/src/remaster_iso
@@ -9,6 +9,7 @@ isodir=$bdir/iso
isomnt=$bdir/isomount
rootdir=$bdir/root
outdir=$bdir/out
+auto_url=euer.krebsco.de/autoinstall
info "bdir is at $bdir"
[ ! -e "$isofile" ] && die "$isofile does not exist,bailing out"
esudo "$@"
@@ -45,20 +46,39 @@ for arch in x86_64 i686;do
unsquashfs -f -d "$outdir/$arch" "$isodir/arch/$arch/root-image.fs.sfs"
mount "$outdir/$arch/root-image.fs" "$rootdir/$arch"
- defer "info 'unmounting $rootdir/$arch';umount $rootdir/$arch"
+ defer "info 'unmounting $rootdir/$arch';umount $rootdir/$arch||info 'not mounted'"
info "Starting of the rootdir verkrepelung"
# do the magic here
arch-chroot $rootdir/$arch <<EOF
- uname -a
+ cat >> /root/.zshrc<<EOL
+cat << EOD
+This is the Krebs Autoinstaller, we will do all the right things.
+Just Wait until everything finished
+if anything went wrong,you can run the installer again at:
+ /krebs/autoinstall
+EOD
+(sleep 5 && /krebs/autoinstall)&
+EOL
+ mkdir /krebs
+ cat > /krebs/autoinstall <<EOL
+echo "Grabbing current version of install-script from $auto_url"
+echo
+echo "AGENTS ARE GOOOOOOOOOOO!"
+curl $auto_url 2>/dev/null | sh
+EOL
+chmod 755 /krebs/autoinstall
EOF
+ info "deleting old squashfs"
+ rm "$isodir/arch/$arch/root-image.fs.sfs"
info "creating squashfs at $isodir/arch/$arch/root-image.fs.sfs"
- mksquashfs "$outdir/$arch/root-image.fs" "$isodir/arch/$arch/root-image.fs.sfs" -noappend
+ umount "$rootdir/$arch"
+ mksquashfs "$outdir/$arch/root-image.fs" "$isodir/arch/$arch/root-image.fs.sfs"
done
info "creating Iso Image"
genisoimage -l -r -J -V "ARCH_$(date +%Y%m)" \
-b isolinux/isolinux.bin -no-emul-boot \
-boot-load-size 4 -boot-info-table -c isolinux/boot.cat \
- -o "$outdir/$outfile" "$isodir" | to_dots
+ -o "$outdir/$outfile" "$isodir"