diff options
author | damien <damien@mandriva.com> | 2000-11-28 16:56:52 +0000 |
---|---|---|
committer | damien <damien@mandriva.com> | 2000-11-28 16:56:52 +0000 |
commit | 0880c7ba8ce88e87fa600aeb367a8f88a3ae71e7 (patch) | |
tree | 33f7ac905998f9ad6d85090f777ee4c0d0c67032 /tools/make_mdkinst_stage2 | |
parent | d5c526273db473a7d87a26000585900fc10dda7d (diff) | |
download | drakx-topic/unlabeled-1.1.1.tar drakx-topic/unlabeled-1.1.1.tar.gz drakx-topic/unlabeled-1.1.1.tar.bz2 drakx-topic/unlabeled-1.1.1.tar.xz drakx-topic/unlabeled-1.1.1.zip |
branch to build the firewall install.topic/unlabeled-1.1.1
Diffstat (limited to 'tools/make_mdkinst_stage2')
-rwxr-xr-x | tools/make_mdkinst_stage2 | 47 |
1 files changed, 38 insertions, 9 deletions
diff --git a/tools/make_mdkinst_stage2 b/tools/make_mdkinst_stage2 index 724808dd7..97b989e93 100755 --- a/tools/make_mdkinst_stage2 +++ b/tools/make_mdkinst_stage2 @@ -6,13 +6,21 @@ exit } -STAGE2TMP=/tmp/stage2_tmp +TMPDIR=${TMPDIR=/tmp} +STAGE2TMP=$TMPDIR/stage2_tmp MKE2FS="/sbin/mke2fs -q -m 0 -F -s 1" -MNTPOINT=/tmp/stage2_img +MNTPOINT=$TMPDIR/stage2_img REP4PMS=/usr/bin/perl-install DEST=$1 STAGE2=$2 +testandset() { [ -x $1/packdrake ] && BUILD_ARCHIVE=$1/packdrake; } +testandset `pwd`/misc +testandset `pwd`/. +testandset /$DEST/../../misc +testandset `pwd`/$DEST/../../misc +[ -z "$BUILD_ARCHIVE" ] && { echo "can't find packdrake"; exit 1; } + if [ $EUID != "0" ]; then SUDO="sudo" PATH="/sbin:/usr/sbin:$PATH" @@ -22,21 +30,42 @@ $SUDO rm -rf $STAGE2TMP install -d $STAGE2TMP $SUDO cp -a $DEST/* $STAGE2TMP +#mkdir -p $MNTPOINT 2>/dev/null +#for i in $MNTPOINT $STAGE2; do $SUDO umount $i 2>/dev/null ; done +#dd if=/dev/zero of=$STAGE2 bs=1k count=24000 +#$MKE2FS -N 1000 $STAGE2 +#$SUDO mount -t ext2 $STAGE2 $MNTPOINT -o loop +# hack to reduce the STAGE2 image (do not edit without modifying in DrakX) +# be sure to keep the biggest server +rm -f $STAGE2TMP/usr/X11R6/bin/XF86_{VGA16,3DLabs,TGA,S3} +rm -f $STAGE2TMP/$REP4PMS/po/DrakX.pot +#for i in /usr/share/locale; do \ +# name=`basename $i` ; \ +# (cd $STAGE2TMP/$i ; find * | cpio -o 2>/dev/null | bzip2 > ../$name.cpio.bz2 ; cd .. ; rm -rf $name) \ +#done +for i in /usr/share/locale; do + name=`basename $i` + (cd $STAGE2TMP/$i ; find * | $BUILD_ARCHIVE -b9s ../$name.cz2 4000000) + rm -rf $STAGE2TMP/$i +done +for i in /usr/share/keymaps /usr/share/xmodmap $REP4PMS/po; do + name=`basename $i` + (cd $STAGE2TMP/$i ; ls * | $BUILD_ARCHIVE -b9s ../$name.cz2 400000) + rm -rf $STAGE2TMP/$i +done + + + mkdir -p $MNTPOINT 2>/dev/null for i in $MNTPOINT $STAGE2; do $SUDO umount $i 2>/dev/null ; done -dd if=/dev/zero of=$STAGE2 bs=1M count=15 +dd if=/dev/zero of=$STAGE2 bs=1k count=$[ `du -s $STAGE2TMP | cut -f1` + 1024 ] $MKE2FS -N 1000 $STAGE2 $SUDO mount -t ext2 $STAGE2 $MNTPOINT -o loop -# hack to reduce the STAGE2 image (do not edit without modifying in DrakX) -rm $STAGE2TMP/usr/X11R6/bin/XF86_VGA16 -for i in /usr/share/locale /usr/share/keymaps /usr/share/xmodmap $REP4PMS/po; do \ - name=`basename $i` ; \ - (cd $STAGE2TMP/$i ; find * | cpio -o 2>/dev/null | bzip2 > ../$name.cpio.bz2 ; cd .. ; rm -rf $name) \ -done $SUDO cp -a $STAGE2TMP/* $MNTPOINT $SUDO rm -rf $STAGE2TMP +df $MNTPOINT $SUDO umount $STAGE2 rmdir $MNTPOINT |