home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
host-198-236-40-254.wlwv.k12.or.us
/
host-198-236-40-254.wlwv.k12.or.us.tar
/
host-198-236-40-254.wlwv.k12.or.us
/
tsu
/
BareMetalInstall.iso
/
tools
/
img2mo
< prev
next >
Wrap
Text File
|
2012-12-18
|
560b
|
27 lines
#!/bin/bash
# Convert old IMG to new MO module
# Author: Tomas M. <http://www.linux-live.org>
#
if [ "$2" = "" ]; then
echo
echo "Convert old format module .img (Linux Live < 5) to new .mo format"
echo "Usage: $0 oldmod.img newmod.mo"
exit
fi
PATH=.:$(dirname $0):/usr/lib:$PATH
. liblinuxlive || exit 1
allow_only_root
TMP=/tmp/img2mo$$
mkdir -p $TMP
mount -o loop $1 $TMP
mount -o loop $TMP/mountme.iso $TMP
create_module $TMP/data $2
if [ $? != 0 ]; then echo "error building compressed image"; exit 1; fi
umount $TMP
umount $TMP
rmdir $TMP