summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Bauer2012-01-27 16:52:49 +0100
committerJonathan Bauer2012-01-27 16:52:49 +0100
commit2cb5b3d213236c4595eed42dd59f8d68a06279d1 (patch)
treef58f92a28367ed178a3f54a7fe4893ed3363cf57
parenteuhm testing... (diff)
downloadusb-boot-stick-2cb5b3d213236c4595eed42dd59f8d68a06279d1.tar.gz
usb-boot-stick-2cb5b3d213236c4595eed42dd59f8d68a06279d1.tar.xz
usb-boot-stick-2cb5b3d213236c4595eed42dd59f8d68a06279d1.zip
almost there, needs pbs urls
-rwxr-xr-xbin/build.initramfs-serial.sh12
-rw-r--r--build/rootfs/serial1
-rw-r--r--inc/functions.iso.sh22
3 files changed, 15 insertions, 20 deletions
diff --git a/bin/build.initramfs-serial.sh b/bin/build.initramfs-serial.sh
index 302168e..862c50d 100755
--- a/bin/build.initramfs-serial.sh
+++ b/bin/build.initramfs-serial.sh
@@ -3,15 +3,3 @@
ROOT_DIR=$(readlink -f $(dirname $(readlink -f $0))/..)
echo -e "[build-initramfs-serial] \t Create initramfs-serial."
-find . | cpio --quiet -H newc -o > ../initramfs-serial.cpio
-cd ..
-gzip initramfs-serial.cpio
-
-mv initramfs-serial.cpio.gz initramfs-serial
-INITRAMFS_SIZE=$(stat -c %s ${ROOT_DIR}/build/initramfs-serial)
-
-cd - > /dev/null 2>&1
-
-echo -e "[build-initramfs] \t New initramfs-serial created."
-echo -e "\t\t\t Location: ${ROOT_DIR}/build/initramfs-serial."
-echo -e "\t\t\t Size: ${INITRAMFS_SIZE} bytes."
diff --git a/build/rootfs/serial b/build/rootfs/serial
deleted file mode 100644
index 731dc2d..0000000
--- a/build/rootfs/serial
+++ /dev/null
@@ -1 +0,0 @@
-11-22-33-44-55
diff --git a/inc/functions.iso.sh b/inc/functions.iso.sh
index 26e605f..60176bd 100644
--- a/inc/functions.iso.sh
+++ b/inc/functions.iso.sh
@@ -66,7 +66,6 @@ pre_start_cleanup () {
setup_dir_structure () {
pinfo "Create dir structure."
mkdir -p $TMP_DIR/isolinux
- mkdir -p $TMP_DIR/pbs
}
copy_files () {
@@ -74,7 +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 $TMP_DIR/initramfs-serial $TMP_DIR/isolinux/serial
+ mv $TMP_DIR/initramfs-serial $TMP_DIR/isolinux/serial
cp -v $SYSLINUX/com32/menu/menu.c32 $TMP_DIR/isolinux/
cp -v $SYSLINUX/com32/menu/vesamenu.c32 $TMP_DIR/isolinux/
@@ -107,15 +106,24 @@ get_preboot_serial() {
then
: # get random serial from pbs
else
- wget -O $TMP_DIR/pbs/serial pbs2.mp.openslx.org/resource/getprebootserials/apikey/apikey_uni-freiburg/serialnr/$serial_choice
+ wget -O $TMP_DIR/serial pbs2.mp.openslx.org/resource/getprebootserials/apikey/apikey_uni-freiburg/serialnr/$serial_choice
fi
}
-write_preboot_serial() {
- cd $TMP_DIR/pbs
- $ROOT_DIR/bin/build.initramfs-serial.sh
+create_serial_module() {
+
+ pinfo "Writing InitramFS Serial Module ..."
+
+ cd $TMP_DIR
+
+ find serial | cpio --quiet -H newc -o > initramfs-serial.cpio
+ gzip initramfs-serial.cpio
+ mv initramfs-serial.cpio.gz initramfs-serial
+
cd -
+
+ rm $TMP_DIR/serial
}
create_iso () {
@@ -141,7 +149,7 @@ run () {
pre_start_cleanup
setup_dir_structure
get_preboot_serial
- write_preboot_serial
+ create_serial_module
copy_files
create_iso