From c68d29d992be64b0b89df1117c4c48fa93a57984 Mon Sep 17 00:00:00 2001 From: Michael Neves Date: Fri, 27 Jan 2012 15:29:57 +0100 Subject: iso serial query --- bin/build.initramfs-serial.sh | 21 +++++++++++++++++++++ config/extlinux/extlinux.conf | 2 +- inc/functions.iso.sh | 12 ++++++++++++ 3 files changed, 34 insertions(+), 1 deletion(-) create mode 100755 bin/build.initramfs-serial.sh diff --git a/bin/build.initramfs-serial.sh b/bin/build.initramfs-serial.sh new file mode 100755 index 0000000..5c09790 --- /dev/null +++ b/bin/build.initramfs-serial.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +ROOT_DIR=$(readlink -f $(dirname $(readlink -f $0))/..) + +SYSLINUX=${ROOT_DIR}/contrib/syslinux/latest +[ ! -f ${SYSLINUX}/Makefile ] && $ROOT_DIR/bin/env.setup-syslinux.sh + +cd ${ROOT_DIR}/build/rootfs +echo -e "[build-initramfs] \t Create initramfs." +find . | cpio --quiet -H newc -o > ../initramfs-default.cpio +cd .. +gzip initramfs-default.cpio + +mv initramfs-default.cpio.gz initramfs-default +INITRAMFS_SIZE=$(stat -c %s ${ROOT_DIR}/build/initramfs-default) + +cd - > /dev/null 2>&1 + +echo -e "[build-initramfs] \t New initramfs created." +echo -e "\t\t\t Location: ${ROOT_DIR}/build/initramfs-default." +echo -e "\t\t\t Size: ${INITRAMFS_SIZE} bytes." diff --git a/config/extlinux/extlinux.conf b/config/extlinux/extlinux.conf index 36a9600..34f0be2 100644 --- a/config/extlinux/extlinux.conf +++ b/config/extlinux/extlinux.conf @@ -50,7 +50,7 @@ LABEL SLXSTDBOOT LABEL DEBUGBOOT MENU LABEL OpenSLX PreBoot - Debug Mode KERNEL kernel - APPEND initrd=initramfs type=USB vga=0x317 debug=3 + APPEND initrd=initramfs,initramfs-serial type=USB vga=0x317 debug=3 TEXT HELP Use this to start the preboot environment with debug shells. ENDTEXT diff --git a/inc/functions.iso.sh b/inc/functions.iso.sh index 3fdece8..a04cbcd 100644 --- a/inc/functions.iso.sh +++ b/inc/functions.iso.sh @@ -73,6 +73,7 @@ copy_files () { cp -v $ROOT_DIR/build/kernel-preboot-latest $TMP_DIR/isolinux/kernel cp -v $ROOT_DIR/build/initramfs-default $TMP_DIR/isolinux/initramfs + cp -v $ROOT_DIR/build/initramfs-serial $TMP_DIR/isolinux/initramfs-serial cp -v $SYSLINUX/com32/menu/menu.c32 $TMP_DIR/isolinux/ cp -v $SYSLINUX/com32/menu/vesamenu.c32 $TMP_DIR/isolinux/ @@ -91,6 +92,17 @@ copy_files () { } +get_preboot_serials() { + + pinfo "Retrieving Serials..." + + unset_quiet + wget -qO- pbs2.mp.openslx.org/resource/getprebootserials/apikey/apikey_uni-freiburg | cat + set_quiet + + wget -O serial pbs2.mp.openslx.org/resource/getprebootserials/apikey/apikey_uni-freiburg/serialnr/$NR + +} create_iso () { pinfo "Create ISO." -- cgit v1.2.3-55-g7522