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

Last change on this file since 2899 was 1842, checked in by Bruno Cornec, 16 years ago
  • Fix lack of /etc/raidtab at restore rime in the right place
  • Adds support for nls_utf8 and pata_serverworks Patches from Dirk Husung (husung_at_tu-harburg.de)
  • Add efibootmgr to deplist.txt in order to be able to modify EFI menu at restore time on ia64
  • Usage of the new testver param of pb 0.8.12 to deliver 2.2.5 packages in a test dir.
  • Update pbcl files for upcoming delivery of 2.2.5
  • Fix an issue on parted output (K instead of KB) in parted2fdisk at restore time
  • Adds support for alb/aft types of bonding on Intel cards (Mark Pinkerton <Mark.Pinkerton_at_emageon.com>)
  • Escape variables in a perl script like mindi-bkphw
  • Better Proliant support at restore time now.
  • Fix a label bug where the variable label should also be re-initialized at each loop
  • start-nfs should NOT do exit => kernel panix as init exits
  • some other fixes for init on denymods
  • Adds boot options denymods (for udev) and forcemods (if not udev)
  • kqemu is denied. Probably should also be done for kvm stuff
  • Fix again the bug on modules link at root of the initrd. Hopefully for good.
  • Wait more around the USB CD emulated by iLO as it takes up to 5 seconds to come up
  • Attempt to fix udev support for RHEL 5.1
  • Better support for automatic iLO Virtual Media with udev
  • Some VMWare support improvements (however, it seems that VMWare support won't be possible anytime soon)
  • during init at restore time, copy all static evices availble for udev, as some distro implementation are no

t yet supported correctly for udev. Not very elegant, but should solve our current issues

  • Fedora 8 now supported as a build target for pb
  • svn.log removed.
  • dependencies reviewd for rhel_3
  • Attempt to fix the lack of modules loaded at restore time - especially fs device drivers
  • removes bkphw dir before potential creation
  • render mount command more vebose at restore time
  • Should fix #217
  • Increase BOOT_SIZE and EXTRA_SIZE to support features such as HW recovery
  • Handles udev.files files which could be symlinks
  • Improve udev support for distro with compressed modules (mdv e.g.)
  • Fix modules.dep copy
  • /sbin/pam_console_apply is needed by mdv udev conf
  • Adds support for nohw boot option to avoid re-setuping the HW conf
  • Improved support for Proliant on cpqacuxe
  • RstHW should be called after driver initialization
  • For debian/ubuntu mindi dpends on mindi-busybox
  • Update mindi-busybox pbcl for correct debian changelog generation, and up2date infos
  • Should fix #215
  • Fix #214 (Thanks to xdelaruelle)
  • Fix again svn.log not used anymore with new pb version
  • Adaptation of build process to upcoming 0.8.12 version of pb
  • Remove MONOTONIC clock to continue to support 2.4 kernels (RHEL 3 e.g. or ESX)
  • Attempt to solve ia64 BMC access through the serial port
  • parted2fdisk binary no more generated
  • do not require perl modules (strict.pm) at restore time
  • try to avoid modprobe messages at restore time
  • on ia64 now use the perl script parted2fdisk at retore time also
  • Also modprobe modules for udev after decompressing the additional ones
  • replace gzip -v9 by gzip -c9. Fix a bug at least on ia64
  • For all modules supported, create symlinks under the mountpoint and extract dev files as some are not automat ically created at the moment
  • Support /vmfs/volumes for ESX
  • Finally do not use vdf for ESX. Only creates issues.
  • Avoids continuing hw support if no product name found
  • Improves ia64 support for bootable image build
  • Fix a potential problem with ramdisk_blocksize param
  • MAKEDEV should also be included in deplist.txt
  • More fixes for udev support for Debian
  • Do not mount /boot if it's already mounted - avoids ESX hang
  • Fix NICs renumbering on Debian at least
  • Udev startup improvement to support iLO + NFS so modprobing all modules seems required as of now
  • Update to version 1.7.3 of busybox for pb
  • Load USB earlier in order to support KBD such as with iLO
  • Do busybox ldd first in order to create a potential /lib64 link correctly and then use it later in the image
  • Use variable DF in mindi to be able to support the ESX vdf
  • Fix mindi for Debian x86_64 where /lib64 is a link
  • Fix issue at restore time for ext2fs params not reused (Fix from Klaus Ade Johnstad <klaus_at_skolelinux.no>)
  • Do not copy udev files if they do not exist In udev case do not insert modules at all (udev should do it alone) May avoid the issue with rhel4.5 kernel ? To be tested
  • Update dependencies for rpm base build as well
  • And also perl is a debian/ubuntu dep
  • Better debian/ubuntu dependecies requirements (mtools)
  • Fix modes on mindi-bkphw (Thanks Phil Walker phil.walker_at_hp.com)
  • Complete rev [1771] for upper case RESTORE cli with syslinux as well
  • Update mindi-busybox to 1.7.3
  • Use RESTORE consistently across mondo to restore without interaction (report from Takeshi Shoji t.shoji_at_tripodw.jp)

(merge -r1769:1841 $SVN_M/branches/2.2.5)

  • Property svn:keywords set to Id
File size: 4.9 KB
Line 
1#!/bin/bash
2#
3# $Id: install.sh 1842 2007-12-15 01:24:34Z 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
130install -m 755 parted2fdisk.pl $local/sbin
131
132install -m 644 mindi.8 $MANDIR
133#install -m 644 ChangeLog COPYING README README.busybox README.ia64 README.pxe TODO INSTALL svn.log $DOCDIR
134
135if [ "_$PREFIX" = "_" ] && [ ! -f $locallib/mindi/rootfs/bin/busybox ]; then
136 echo "WARNING: no busybox found, mindi will not work on this arch ($ARCH)"
137fi
138
139# Managing parted2fdisk
140if [ "$ARCH" = "ia64" ] ; then
141 (cd $local/sbin && ln -sf parted2fdisk.pl parted2fdisk)
142 install -s -m 755 $local/sbin/parted2fdisk.pl $locallib/mindi/rootfs/sbin/parted2fdisk
143 # Try to avoid the need ot additional perl modules at the moment
144 perl -pi -e 's/use strict;//' $locallib/mindi/rootfs/sbin/parted2fdisk
145else
146 # FHS requires fdisk under /sbin
147 (cd $local/sbin && ln -sf /sbin/fdisk parted2fdisk)
148 echo "Symlinking fdisk to parted2fdisk"
149 ( cd $locallib/mindi/rootfs/sbin && ln -sf fdisk parted2fdisk)
150fi
151
152if [ "$PKGBUILDMINDI" != "true" ]; then
153 chown -R root:root $locallib/mindi $conf # $DOCDIR
154 chown root:root $local/sbin/mindi $MANDIR/mindi.8 $locallib/mindi/analyze-my-lvm $local/sbin/parted2fdisk.pl
155 if [ "$ARCH" = "ia64" ] ; then
156 chown root:root $local/sbin/parted2fdisk
157 fi
158fi
159
160# Special case for SuSE family where doc is put elsewhere in the RPM
161# if [ -e /etc/SuSE-release ]; then
162 # rm -rf $DOCDIR
163# fi
164
165# Special case for Debian family where doc is put elsewhere in the DEB
166# if [ -e /etc/debian_version ]; then
167 # rm -rf $DOCDIR
168# fi
169
170exit 0
Note: See TracBrowser for help on using the repository browser.