From Yann Dirson <dirson@debian.org>:
* util/mkbimage: Misc syntax fixes.
This commit is contained in:
parent
50396703ad
commit
84fbf16f40
2 changed files with 17 additions and 6 deletions
|
@ -1,3 +1,8 @@
|
|||
2004-04-29 Robert Millan <robertmh@gnu.org>
|
||||
|
||||
From Yann Dirson <dirson@debian.org>:
|
||||
* util/mkbimage: Misc syntax fixes.
|
||||
|
||||
2004-04-29 Jeroen Dekkers <jeroen@dekkers.cx>
|
||||
|
||||
* stage2/char_io.c (grub_memcmp): Define for stage1.5 too.
|
||||
|
|
|
@ -178,9 +178,12 @@ mkbimage_cp ()
|
|||
esac
|
||||
|
||||
if [ "$offset" = 0 ] && which $cp > /dev/null ; then
|
||||
$mkdir ${image}:/boot
|
||||
$mkdir ${image}:/boot/grub
|
||||
$cp ${image}1/boot/grub/* ${image}:/boot/grub/
|
||||
for dir in $(cd ${image}1 && find -type d) ; do
|
||||
$mkdir ${image}:$dir
|
||||
done
|
||||
for file in $(cd ${image}1 && find -type f) ; do
|
||||
$cp ${image}1/$file ${image}:$file
|
||||
done
|
||||
elif [ "`id -u`" = "0" ] ; then
|
||||
losetup $lo_options /dev/loop1 $image
|
||||
mkdir ${image}.mnt
|
||||
|
@ -345,7 +348,7 @@ if [ "$image_type" = "hd" ]; then
|
|||
|
||||
|
||||
EOT
|
||||
offset="-o $(($sectors * $block_size))"
|
||||
offset="$(($sectors * $block_size))"
|
||||
type_option=
|
||||
else
|
||||
offset="0"
|
||||
|
@ -355,7 +358,8 @@ fi
|
|||
mkbimage_mkfs
|
||||
|
||||
# then untar the files
|
||||
mkdir ${image}1 2>/dev/null
|
||||
[ ! -e ${image}1 ] || { echo "${image}1 exists, please remove it first"; exit 1;}
|
||||
mkdir -p ${image}1
|
||||
$decompress $tarfile | tar -C ${image}1 $debug -xf -
|
||||
|
||||
# copy the untarred files into the filesystem image
|
||||
|
@ -364,7 +368,7 @@ mkbimage_cp
|
|||
#We verify that the stage2 exists and we search the name
|
||||
stage2_os_name=`find ${image}1 -name stage2 -type f`
|
||||
|
||||
[ ! $stage2_os_name ] && { echo "I can't find stage2!"; exit 1;}
|
||||
[ -r "$stage2_os_name" ] || { echo "I can't find stage2!"; exit 1;}
|
||||
|
||||
#------------------------- GRUB stuff
|
||||
if [ "$image_type" = "hd" ]; then
|
||||
|
@ -408,4 +412,6 @@ mkisofs -b <image> -hard-disk-boot -c boot.catalog -o raw.iso <dir>
|
|||
Enjoy!
|
||||
EOF
|
||||
|
||||
rm -rf ${image}1
|
||||
|
||||
exit 0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue