source: MondoRescue/branches/stable/mindi/install.sh@ 1770

Last change on this file since 1770 was 1770, checked in by Bruno Cornec, 16 years ago
  • Better output for mindi-busybox revision
  • Remove dummy file created on NFS - report from Arnaud Tiger <arnaud.tiger_at_hp.com>
  • strace useful for debug
  • fix new versions for pb (2.0.0 for mindi and 1.7.2 for mindi-busybox)
  • fix build process for mindi-busybox + options used in that version (dd for label-partitions-as-necessary)
  • fix typo in label-partitions-as-necessary which doesn't seem to work
  • Update to busybox 1.7.2
  • perl is now required at restore time to support uuid swap partitions (and will be used for many other thigs

in the future for sure)

  • next mindi version will be 2.0.0 due to all the changes made in it (udev may break working distros)
  • small optimization in mindi on keyboard handling (one single find instead of multiple)
  • better interaction for USB device when launching mindi manually
  • attempt to automatically guess block disk size for ramdisk
  • fix typos in bkphw
  • Fix the remaining problem with UUID support for swap partitions
  • Updates mondoarchive man page for USB support
  • Adds preliminary Hardware support to mindi (Proliant SSSTK)
  • Tries to add udev support also for rhel4
  • Fix UUID support which was still broken.
  • Be conservative in test for the start-nfs script
  • Update config file for mindi-busybox for 1.7.2 migration
  • Try to run around a busybox bug (1.2.2 pb on inexistant links)
  • Add build content for mindi-busybox in pb
  • Remove distributions content for mindi-busybox
  • Fix a warning on inexistant raidtab
  • Solve problem on tmpfs in restore init (Problem of inexistant symlink and busybox)
  • Create MONDO_CACHE and use it everywhere + creation at start
  • Really never try to eject a USB device
  • Fix a issue with &> usage (replaced with 1> and 2>)
  • Adds magic file to depllist in order to have file working + ldd which helps for debugging issues
  • tty modes correct to avoid sh error messages
  • Use ext3 normally and not ext2 instead
  • USB device should be corrected after reading (take 1st part)
  • Adds a mount_USB_here function derived from mount_CDROM_here
  • usb detection place before /dev detection in device name at restore time
  • Fix when restoring from USB: media is asked in interactive mode
  • Adds USB support for mondorestore
  • mount_cdrom => mount_media
  • elilo.efi is now searched throughout /boot/efi and not in a fixed place as there is no standard
  • untar-and-softlink => untar (+ interface change)
  • suppress useless softlinks creation/removal in boot process
  • avoids udevd messages on groups
  • Increase # of disks to 99 as in mindi at restore time (should be a conf file parameter)
  • skip existing big file creation
  • seems to work correctly for USB mindi boot
  • Adds group and tty link to udev conf
  • Always load usb-torage (even 2.6) to initiate USB bus discovery
  • Better printing of messages
  • Attempt to fix a bug in supporting OpenSusE 10.3 kernel for initramfs (mindi may now use multiple regex for kernel initrd detection)
  • Links were not correctly done as non relative for modules in mindi
  • exclusion of modules denied now works
  • Also create modules in their ordinary place, so that classical modprobe works + copy modules.dep
  • Fix bugs for DENY_MODS handling
  • Add device /dev/console for udev
  • ide-generic should now really be excluded
  • Fix a bug in major number for tty
  • If udev then adds modprobe/insmod to rootfs
  • tty0 is also cretaed with udev
  • ide-generic put rather in DENY_MODS
  • udevd remove from deplist s handled in mindi directly
  • better default for mindi when using --usb
  • Handles dynamically linked busybox (in case we want to use it soon ;-)
  • Adds fixed devices to create for udev
  • ide-generic should not be part of the initrd when using libata v2
  • support a dynamically linked udev (case on Ubuntu 7.10 and Mandriva 2008.0 so should be quite generic) This will give incitation to move to dyn. linked binaries in the initrd which will help for other tasks (ia6 4)
  • Improvement in udev support (do not use cl options not available in busybox)
  • Udev in mindi
    • auto creation of the right links at boot time with udev-links.conf(from Mandriva 2008.0)
    • rework startup of udev as current makes kernel crash (from Mandriva 2008.0)
    • add support for 64 bits udev
  • Try to render MyInsmod silent at boot time
  • Adds udev support (mandatory for newest distributions to avoid remapping of devices in a different way as on the original system)
  • We also need vaft format support for USB boot
  • Adds libusual support (Ubuntu 7.10 needs it for USB)
  • Improve Ubuntu/Debian keyboard detection and support
  • pbinit adapted to new pb (0.8.10). Filtering of docs done in it
  • Suppress some mondo warnings and errors on USB again
  • Tries to fix lack of files in deb mindi package
  • Verify should now work for USB devices
  • More log/mesages improvement for USB support
  • - Supress g_erase_tmpdir_and_scratchdir
  • Improve some log messages for USB support
  • Try to improve install in mindi to avoid issues with isolinux.cfg not installed vene if in the pkg :-(
  • Improve mindi-busybox build
  • In conformity with pb 0.8.9
  • Add support for Ubuntu 7.10 in build process
  • Add USB Key button to Menu UI (CD streamer removed)
  • Attempt to fix error messages on tmp/scratch files at the end by removing those dir at the latest possible.
  • Fix a bug linked to the size of the -E param which could be used (Arnaud Tiger/René Ribaud).
  • Integrate ~/.pbrc content into mondorescue.pb (required project-builder >= 0.8.7)
  • Put mondorescue in conformity with new pb filtering rules
  • Add USB support at restore time (no test done yet). New start-usb script PB varibale added where useful
  • Unmounting USB device before removal of temporary scratchdir
  • Stil refining USB copy back to mondo (one command was not executed)
  • No need to have the image subdor in the csratchdir when USB.
  • umount the USB partition before attempting to use it
  • Remove useless copy from mindi to mondo at end of USB handling

(risky merge, we are raising the limits of 2 diverging branches. The status of stable is not completely sure as such. Will need lots of tests, but it's not yet done :-()
(merge -r1692:1769 $SVN_M/branches/2.2.5)

  • Property svn:keywords set to Id
File size: 5.4 KB
Line 
1#!/bin/bash
2#
3# $Id: install.sh 1770 2007-11-06 10:01:53Z bruno $
4#
5
6if [ ! -f "mindi" ] ; then
7 echo "Please 'cd' to the directory you have just untarred." >> /dev/stderr
8 exit 1
9fi
10
11if [ "_$PREFIX" != "_" ]; then
12 local=${HEAD}$PREFIX
13 sublocal=$PREFIX
14 if [ "_$CONFDIR" != "_" ]; then
15 conf=${HEAD}$CONFDIR/mindi
16 subconf=$CONFDIR/mindi
17 else
18 echo "CONFDIR should be defined if PREFIX is defined"
19 exit -1
20 fi
21else
22 local=/usr/local
23 sublocal=$local
24 if [ -f /usr/sbin/mindi ]; then
25 echo "WARNING: /usr/sbin/mindi exists. You should probably remove the mindi package !"
26 fi
27 conf=$local/etc/mindi
28 subconf=$conf
29 echo $PATH | grep $local/sbin > /dev/null || echo "Warning - your PATH environmental variable is BROKEN. Please add $local/sbin to your PATH."
30fi
31
32if uname -a | grep Knoppix > /dev/null || [ -e "/ramdisk/usr" ] ; then
33 local=/ramdisk/usr
34 sublocal=$local
35 conf=/ramdisk/etc
36 subconf=$conf
37 export PATH=/ramdisk/usr/sbin:/ramdisk/usr/bin:/$PATH
38fi
39
40MINDIVER=PBVER
41MINDIREV=PBREV
42ARCH=`/bin/uname -m`
43echo "mindi ${MINDIVER}-r${MINDIREV} will be installed under $local"
44
45if [ _"$CACHEDIR" = _"" ]; then
46 CACHEDIR=$local/var/cache/mindi
47else
48 CACHEDIR=${HEAD}$CACHEDIR
49fi
50if [ _"$MANDIR" = _"" ]; then
51 MANDIR=$local/share/man/man8
52else
53 MANDIR=${HEAD}$MANDIR/man8
54fi
55if [ _"$DOCDIR" = _"" ]; then
56 DOCDIR=$local/share/doc/mindi-$MINDIVER
57else
58 DOCDIR=${HEAD}$DOCDIR/mindi-$MINDIVER
59fi
60if [ _"$LIBDIR" = _"" ]; then
61 echo $ARCH | grep -E '^i[0-9]86$' &> /dev/null && ARCH=i386 && locallib=$local/lib
62 echo $ARCH | grep -E '^x86_64$' &> /dev/null && locallib=$local/lib64
63 echo $ARCH | grep -E '^ia64$' &> /dev/null && locallib=$local/lib
64 sublocallib="$locallib/mindi"
65else
66 locallib=${HEAD}$LIBDIR
67 sublocallib="$LIBDIR/mindi"
68fi
69
70echo "Creating target directories ..."
71install -m 755 -d $conf $conf/deplist.d $locallib/mindi $MANDIR $local/sbin $CACHEDIR # $DOCDIR
72
73echo "Copying files ..."
74install -m 644 isolinux.cfg msg-txt isolinux-H.cfg syslinux.cfg syslinux-H.cfg dev.tgz $locallib/mindi
75install -m 644 distributions/conf/deplist.d/* $conf/deplist.d
76install -m 444 distributions/conf/mindi.conf.dist $conf
77#
78# Compute mindi.conf.dist (cecked by mindi) to avoid changes here
79# Modify the checksum file so that path is correct at execution time
80#
81md5sum $conf/mindi.conf.dist > $conf/mindi.conf.dist.md5
82perl -pi -e "s~$conf~$subconf~" $conf/mindi.conf.dist.md5
83#
84# Example of mindi.conf
85#
86if [ ! -e $conf/mindi.conf ]; then
87 cat > $conf/mindi.conf << EOF
88#
89# Configuration file for mindi
90#
91# By default values are taken from $conf/mindi.conf.dist
92# You can override them here
93#
94# e.g.
95#
96#mindi_tmp_dir="/var/tmp"
97#
98EOF
99 chmod 644 $conf/mindi.conf
100fi
101
102#
103# Example of deplist.txt
104#
105if [ ! -e $conf/deplist.txt ]; then
106 cat > $conf/deplist.txt << EOF
107# mindi additional dependency list
108#
109# NB:
110# You have to give an absolute path
111# If you want to add something, just add it on its own line. K.I.S.S.
112
113EOF
114 chmod 644 $conf/deplist.txt
115fi
116
117cp -af rootfs aux-tools $locallib/mindi
118if [ -e FindDistroFailsafe ]; then
119 cp -af FindDistroFailsafe $locallib/mindi
120fi
121chmod 755 $locallib/mindi/rootfs/sbin/*
122chmod 755 $locallib/mindi/aux-tools/sbin/*
123install -m 755 analyze-my-lvm $locallib/mindi
124install -m 644 isolinux.cfg msg-txt sys-disk.raw.gz isolinux-H.cfg syslinux.cfg syslinux-H.cfg dev.tgz $locallib/mindi
125install -m 644 deplist.txt udev.files proliant.files $conf
126
127# Substitute variables for mindi
128sed -e "s~^MINDI_PREFIX=XXX~MINDI_PREFIX=$sublocal~" -e "s~^MINDI_CONF=YYY~MINDI_CONF=$subconf~" -e "s~^MINDI_LIB=LLL~MINDI_LIB=$sublocallib~" mindi > $local/sbin/mindi
129sed -e "s~= "YYY"~= "$subconf"~" mindi-bkphw > $local/sbin/mindi-bkphw
130sed -e "s~^my \$mindiconf=YYY~my \$mindiconf=\"$subconf\";~" mindi-bkphw > $local/sbin/mindi-bkphw
131chmod 755 $local/sbin/mindi $local/sbin/mindi-bkphw
132install -m 755 parted2fdisk.pl $local/sbin
133
134install -m 644 mindi.8 $MANDIR
135#install -m 644 ChangeLog COPYING README README.busybox README.ia64 README.pxe TODO INSTALL svn.log $DOCDIR
136
137if [ "_$PREFIX" = "_" ] && [ ! -f $locallib/mindi/rootfs/bin/busybox ]; then
138 echo "WARNING: no busybox found, mindi will not work on this arch ($ARCH)"
139fi
140
141# Managing parted2fdisk
142if [ "$ARCH" = "ia64" ] ; then
143 (cd $local/sbin && ln -sf parted2fdisk.pl parted2fdisk)
144 make -f Makefile.parted2fdisk DEST=$locallib/mindi install
145 if [ -f $locallib/mindi/rootfs/sbin/parted2fdisk-$ARCH ]; then
146 echo "Installing parted2fdisk ..."
147 install -s -m 755 $locallib/mindi/rootfs/sbin/parted2fdisk-$ARCH $locallib/mindi/rootfs/sbin/parted2fdisk
148 install -s -m 755 $locallib/mindi/rootfs/sbin/parted2fdisk-$ARCH $local/sbin/parted2fdisk
149 else
150 echo "WARNING: no parted2fdisk found, mindi will not work on this arch ($ARCH)"
151 fi
152else
153 # FHS requires fdisk under /sbin
154 (cd $local/sbin && ln -sf /sbin/fdisk parted2fdisk)
155 echo "Symlinking fdisk to parted2fdisk"
156 ( cd $locallib/mindi/rootfs/sbin && ln -sf fdisk parted2fdisk)
157fi
158# Remove left parted2fdisk
159rm -f $locallib/mindi/rootfs/sbin/parted2fdisk-*
160
161if [ "$PKGBUILDMINDI" != "true" ]; then
162 chown -R root:root $locallib/mindi $conf # $DOCDIR
163 chown root:root $local/sbin/mindi $MANDIR/mindi.8 $locallib/mindi/analyze-my-lvm $local/sbin/parted2fdisk.pl
164 if [ "$ARCH" = "ia64" ] ; then
165 chown root:root $local/sbin/parted2fdisk
166 fi
167fi
168
169# Special case for SuSE family where doc is put elsewhere in the RPM
170# if [ -e /etc/SuSE-release ]; then
171 # rm -rf $DOCDIR
172# fi
173
174# Special case for Debian family where doc is put elsewhere in the DEB
175# if [ -e /etc/debian_version ]; then
176 # rm -rf $DOCDIR
177# fi
178
179exit 0
Note: See TracBrowser for help on using the repository browser.