summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2000-01-04 22:13:57 +0000
committerPascal Rigaux <pixel@mandriva.com>2000-01-04 22:13:57 +0000
commit85e21d9abb2daf68be31c33dcdbc8874c3cc8fdc (patch)
tree3a45e1e56f50f9f59ea5d3db0be6b279ee0eb526 /tools
parentf7537f35d8002323124bbb8aa40b627152660bf3 (diff)
downloaddrakx-backup-do-not-use-85e21d9abb2daf68be31c33dcdbc8874c3cc8fdc.tar
drakx-backup-do-not-use-85e21d9abb2daf68be31c33dcdbc8874c3cc8fdc.tar.gz
drakx-backup-do-not-use-85e21d9abb2daf68be31c33dcdbc8874c3cc8fdc.tar.bz2
drakx-backup-do-not-use-85e21d9abb2daf68be31c33dcdbc8874c3cc8fdc.tar.xz
drakx-backup-do-not-use-85e21d9abb2daf68be31c33dcdbc8874c3cc8fdc.zip
no_comment
Diffstat (limited to 'tools')
-rw-r--r--tools/Makefile2
-rwxr-xr-xtools/make_mdkinst_stage225
2 files changed, 21 insertions, 6 deletions
diff --git a/tools/Makefile b/tools/Makefile
index 3ffd8a0cd..cfc861723 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -14,7 +14,7 @@ $(DIRS):
install:
$(MAKE) gendepslist rpm2header
- install make_mdkinst_stage2 gendepslist rpm2header genhdlist $(ROOTDEST)/misc
+ install make_mdkinst_stage2 build_archive gendepslist rpm2header genhdlist $(ROOTDEST)/misc
mkdir -p $(DEST)/usr/bin
xhost+: %: %.c
diff --git a/tools/make_mdkinst_stage2 b/tools/make_mdkinst_stage2
index f2619095e..483bdfaaa 100755
--- a/tools/make_mdkinst_stage2
+++ b/tools/make_mdkinst_stage2
@@ -13,6 +13,13 @@ REP4PMS=/usr/bin/perl-install
DEST=$1
STAGE2=$2
+testandset() { [ -x $1/build_archive ] && BUILD_ARCHIVE=$1/build_archive; }
+testandset `pwd`/misc
+testandset `pwd`/.
+testandset /$DEST/../../misc
+testandset `pwd`/$DEST/../../misc
+[ -z "$BUILD_ARCHIVE" ] && { echo "can't find build_archive"; exit 1; }
+
if [ $EUID != "0" ]; then
SUDO="sudo"
PATH="/sbin:/usr/sbin:$PATH"
@@ -24,19 +31,27 @@ $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=15700
+dd if=/dev/zero of=$STAGE2 bs=1k count=16000
$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) \
+rm -f $STAGE2TMP/usr/X11R6/bin/XF86_VGA16
+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/keymaps /usr/share/xmodmap $REP4PMS/po; do
+ name=`basename $i`
+ (cd $STAGE2TMP/$i ; ls * | $BUILD_ARCHIVE ../$name 400000)
+ rm -rf $STAGE2TMP/$i
done
+
$SUDO cp -a $STAGE2TMP/* $MNTPOINT
$SUDO rm -rf $STAGE2TMP
+df $MNTPOINT
$SUDO umount $STAGE2
rmdir $MNTPOINT