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>
|
2004-04-29 Jeroen Dekkers <jeroen@dekkers.cx>
|
||||||
|
|
||||||
* stage2/char_io.c (grub_memcmp): Define for stage1.5 too.
|
* stage2/char_io.c (grub_memcmp): Define for stage1.5 too.
|
||||||
|
|
|
@ -178,9 +178,12 @@ mkbimage_cp ()
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if [ "$offset" = 0 ] && which $cp > /dev/null ; then
|
if [ "$offset" = 0 ] && which $cp > /dev/null ; then
|
||||||
$mkdir ${image}:/boot
|
for dir in $(cd ${image}1 && find -type d) ; do
|
||||||
$mkdir ${image}:/boot/grub
|
$mkdir ${image}:$dir
|
||||||
$cp ${image}1/boot/grub/* ${image}:/boot/grub/
|
done
|
||||||
|
for file in $(cd ${image}1 && find -type f) ; do
|
||||||
|
$cp ${image}1/$file ${image}:$file
|
||||||
|
done
|
||||||
elif [ "`id -u`" = "0" ] ; then
|
elif [ "`id -u`" = "0" ] ; then
|
||||||
losetup $lo_options /dev/loop1 $image
|
losetup $lo_options /dev/loop1 $image
|
||||||
mkdir ${image}.mnt
|
mkdir ${image}.mnt
|
||||||
|
@ -345,7 +348,7 @@ if [ "$image_type" = "hd" ]; then
|
||||||
|
|
||||||
|
|
||||||
EOT
|
EOT
|
||||||
offset="-o $(($sectors * $block_size))"
|
offset="$(($sectors * $block_size))"
|
||||||
type_option=
|
type_option=
|
||||||
else
|
else
|
||||||
offset="0"
|
offset="0"
|
||||||
|
@ -355,7 +358,8 @@ fi
|
||||||
mkbimage_mkfs
|
mkbimage_mkfs
|
||||||
|
|
||||||
# then untar the files
|
# 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 -
|
$decompress $tarfile | tar -C ${image}1 $debug -xf -
|
||||||
|
|
||||||
# copy the untarred files into the filesystem image
|
# 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
|
#We verify that the stage2 exists and we search the name
|
||||||
stage2_os_name=`find ${image}1 -name stage2 -type f`
|
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
|
#------------------------- GRUB stuff
|
||||||
if [ "$image_type" = "hd" ]; then
|
if [ "$image_type" = "hd" ]; then
|
||||||
|
@ -408,4 +412,6 @@ mkisofs -b <image> -hard-disk-boot -c boot.catalog -o raw.iso <dir>
|
||||||
Enjoy!
|
Enjoy!
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
rm -rf ${image}1
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue