Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- ASM=StorMan
- REPLACE_XLOADIMAGE=true
- function ProcessBootCD () {
- WDIR=$1
- pushd ${WDIR} >/dev/null
- tar zxf bootcd.tar.gz
- rm -f bootcd.tar.gz
- if [ "${REPLACE_XLOADIMAGE}" ] ; then
- if [ -f "xloadimage.tgz" ] ; then
- tar zxf xloadimage.tgz
- rm -f xloadimage.tgz
- rm -f install.sh
- else
- echo "Cannot replace xloadimage, the tarfile is missing!!"
- REPLACE_XLOADIMAGE=
- fi
- fi
- pushd bootcd >/dev/null
- if [ "${REPLACE_XLOADIMAGE}" ] ; then
- base=usr/X11R6/bin
- cp -p ../xloadimage.4.1/xloadimagerc usr/lib/X11/Xloadimage
- rm -f ${base}/xloadimage
- rm -f ${base}/xsetbg
- rm -f ${base}/xview
- rm -f ${base}/uufilter
- cp -p ../xloadimage.4.1/xloadimage ${base}/xloadimage
- cp -p ../xloadimage.4.1/uufilter ${base}/uufilter
- fi
- if [ -d "../../cdrom5/linux/manager/" ];then
- RPMFILE=`find ../../cdrom5/linux/manager/ -name "${ASM}*.i386.rpm"`
- fi
- if [ -f "$RPMFILE" ];then
- rpm2cpio $RPMFILE | cpio -id
- find usr/${ASM} -name arcconf -exec chmod 775 {} \;
- find usr/${ASM} -name hrconf -exec chmod 775 {} \;
- rm -f usr/${ASM}/*.exe
- tar zxf usr/${ASM}/*jre*.tgz -C usr/${ASM}
- rm -f usr/${ASM}/*jre*.tgz
- rm -rf usr/${ASM}/pftw
- mkdir -p common/usr/${ASM}
- for i in `ls usr/${ASM}`;do
- ln -s /usr/${ASM}_CD/$i common/usr/${ASM}/$i
- done
- ln -s /common/usr/${ASM}/Search.htm usr/${ASM}/help/Search.htm
- if [ "${REPLACE_XLOADIMAGE}" ] ; then
- mkdir -p common/usr/X11R6/bin
- ls -l common/usr/X11R6/bin
- ln -s /usr/X11R6/bin/xloadimage common/usr/X11R6/bin/xsetbg
- ls -l common/usr/X11R6/bin/xsetbg
- ln -s /usr/X11R6/bin/xloadimage common/usr/X11R6/bin/xview
- ls -l common/usr/X11R6/bin/xview
- fi
- gunzip ramdisk.tgz
- tar rf ramdisk.tar common/
- rm -rf common/
- gzip ramdisk.tar
- mv ramdisk.tar.gz ramdisk.tgz
- mv usr/${ASM} usr/${ASM}_CD
- ln -s /common/usr/${ASM} usr/${ASM}
- else
- echo "ERROR: can't find the ${ASM} RPM!"
- fi
- if [ "${REPLACE_XLOADIMAGE}" ] ; then
- rm -rf ../xloadimage.4.1
- fi
- popd >/dev/null
- popd >/dev/null
- }
- pushd ../cdrom3 >/dev/null
- mkdir -p isoboot
- tar zxf isolinux.tar.gz -C isoboot/
- rm -f isolinux.tar.gz
- pushd isoboot/bootcd/isolinux >/dev/null
- gunzip initrd.gz
- mkdir tmp
- mount -oloop initrd tmp/
- echo ""
- echo "Updating BUILD_NUM to ${KABOODLE_NUM}"
- sed -e "s,^BUILD_NUM=.*,BUILD_NUM=${KABOODLE_NUM}," tmp/start > tmp/newstart
- chmod 755 tmp/newstart
- mv -f tmp/newstart tmp/start
- echo ""
- umount tmp
- rmdir tmp
- gzip initrd
- popd >/dev/null
- popd >/dev/null
- ProcessBootCD ../cdrom1
- ProcessBootCD ../cdrom4
- #############
- # START NOTES
- #############
- ## Shell script on the bundled DVD Disc for a consumer grade Adaptec RAID 6405.
- ## Only modifications to the Script are these comments.
- ###########
- # END NOTES
- ###########
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement