47 lines
1.1 KiB
Plaintext
47 lines
1.1 KiB
Plaintext
|
#!/bin/bash
|
||
|
#
|
||
|
# post-boot-mipsel - (C) 2002 by Karsten Merker <merker@debian.org>
|
||
|
#
|
||
|
# Do post-image-building tasks for mipsel, to make CDs bootable.
|
||
|
# requires delo >= 0.8
|
||
|
#
|
||
|
# You may copy, modify and distribute this under the terms of the GNU
|
||
|
# General Public License as published by the Free Software Foundation;
|
||
|
# either version 2 of the License, or (at your option) any later version.
|
||
|
#
|
||
|
# Using this script on any architecture other than mipsel requires
|
||
|
# having binutils-multiarch installed, as it uses objdump (a part
|
||
|
# of binutils) which is platform dependent. The binutils-multiarch
|
||
|
# package contains an objdump which is capable of dealing with other
|
||
|
# arches' binary formats.
|
||
|
#
|
||
|
# $1 is the CD number
|
||
|
# $2 is the temporary CD build dir
|
||
|
# $3 is the image file
|
||
|
|
||
|
set -e
|
||
|
|
||
|
N=$1
|
||
|
CDROOT=$2
|
||
|
CDIMAGE=$3
|
||
|
|
||
|
echo "post-boot-mipsel called"
|
||
|
echo "pwd=${PWD}, N=$N, CDROOT=${CDROOT}, CDIMAGE=${CDIMAGE}"
|
||
|
|
||
|
|
||
|
# Strip NONUS part of disk number
|
||
|
# NN will be 1...N so it can be used as an index
|
||
|
#
|
||
|
NN=`echo $N | sed -e 's/_NONUS//'`
|
||
|
|
||
|
cd $CDROOT/..
|
||
|
|
||
|
# Only disk 1 bootable
|
||
|
if [ $NN != 1 ]; then
|
||
|
exit 0
|
||
|
fi
|
||
|
|
||
|
"$DELOROOT"/sbin/delo -r "$CDIMAGE" -d
|
||
|
|
||
|
exit 0
|