Changeset 1842 in MondoRescue for branches/stable
- Timestamp:
- Dec 15, 2007, 2:24:34 AM (17 years ago)
- Location:
- branches/stable
- Files:
-
- 6 deleted
- 47 edited
- 6 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/stable/mindi-busybox/.config
r1770 r1842 1 1 # 2 2 # Automatically generated make config: don't edit 3 # Busybox version: 1.7. 2rPBREV4 # Sun Nov 4 01:53:1720073 # Busybox version: 1.7.3-rPBREV 4 # Thu Nov 15 17:11:06 2007 5 5 # 6 6 CONFIG_HAVE_DOT_CONFIG=y … … 81 81 # CONFIG_FEATURE_USERNAME_COMPLETION is not set 82 82 # CONFIG_FEATURE_EDITING_FANCY_PROMPT is not set 83 CONFIG_MONOTONIC_SYSCALL=y 83 # CONFIG_MONOTONIC_SYSCALL is not set 84 84 CONFIG_IOCTL_HEX2STR_ERROR=y 85 85 -
branches/stable/mindi-busybox/Makefile
r1770 r1842 1 1 VERSION = 1 2 2 PATCHLEVEL = 7 3 SUBLEVEL = 23 SUBLEVEL = 3 4 4 EXTRAVERSION = -rPBREV 5 5 NAME = Unnamed -
branches/stable/mindi-busybox/coreutils/tail.c
r1770 r1842 48 48 { 49 49 ssize_t r; 50 off_t current , end;50 off_t current; 51 51 struct stat sbuf; 52 52 53 end = current = lseek(fd, 0, SEEK_CUR); 54 if (!fstat(fd, &sbuf)) 55 end = sbuf.st_size; 56 lseek(fd, end < current ? 0 : current, SEEK_SET); 53 /* (A good comment is missing here) */ 54 current = lseek(fd, 0, SEEK_CUR); 55 /* /proc files report zero st_size, don't lseek them. */ 56 if (fstat(fd, &sbuf) == 0 && sbuf.st_size) 57 if (sbuf.st_size < current) 58 lseek(fd, 0, SEEK_SET); 59 57 60 r = safe_read(fd, buf, count); 58 61 if (r < 0) { … … 68 71 static unsigned eat_num(const char *p) 69 72 { 70 if (*p == '-') p++; 71 else if (*p == '+') { p++; G.status = EXIT_FAILURE; } 73 if (*p == '-') 74 p++; 75 else if (*p == '+') { 76 p++; 77 G.status = EXIT_FAILURE; 78 } 72 79 return xatou_sfx(p, tail_suffixes); 73 80 } -
branches/stable/mindi-busybox/include/libbb.h
r1770 r1842 777 777 extern void change_identity(const struct passwd *pw); 778 778 extern const char *change_identity_e2str(const struct passwd *pw); 779 extern void run_shell(const char *shell, int loginshell, const char *command, const char **additional_args) ;779 extern void run_shell(const char *shell, int loginshell, const char *command, const char **additional_args) ATTRIBUTE_NORETURN; 780 780 #if ENABLE_SELINUX 781 781 extern void renew_current_security_context(void); -
branches/stable/mindi-busybox/networking/httpd.c
r1770 r1842 1186 1186 * and send it to the peer. So please no SIGPIPEs! */ 1187 1187 signal(SIGPIPE, SIG_IGN); 1188 1189 /* Accound for POSTDATA already in hdr_buf */ 1190 bodyLen -= hdr_cnt; 1188 1191 1189 1192 /* This loop still looks messy. What is an exit criteria? -
branches/stable/mindi-busybox/networking/inetd.c
r1770 r1842 735 735 /* goto more; */ 736 736 737 sep->se_server = xxstrdup(skip(&cp)); 737 arg = skip(&cp); 738 sep->se_server = xxstrdup(arg); 738 739 if (strcmp(sep->se_server, "internal") == 0) { 739 740 #ifdef INETD_FEATURE_ENABLED … … 760 761 #endif 761 762 argc = 0; 762 for ( arg = skip(&cp); cp; arg = skip(&cp)) {763 for (; cp; arg = skip(&cp)) { 763 764 if (argc < MAXARGV) 764 765 sep->se_argv[argc++] = xxstrdup(arg); -
branches/stable/mindi-busybox/networking/libiproute/iptunnel.c
r1770 r1842 242 242 NEXT_ARG(); 243 243 key = index_in_strings(keywords, *argv); 244 if (key == ARG_any)244 if (key != ARG_any) 245 245 p->iph.daddr = get_addr32(*argv); 246 246 } else if (key == ARG_local) { 247 247 NEXT_ARG(); 248 248 key = index_in_strings(keywords, *argv); 249 if (key == ARG_any)249 if (key != ARG_any) 250 250 p->iph.saddr = get_addr32(*argv); 251 251 } else if (key == ARG_dev) { -
branches/stable/mindi-busybox/shell/ash.c
r1770 r1842 4380 4380 /* Lives far away from here, needed for forkchild */ 4381 4381 static void closescript(void); 4382 4382 4383 /* Called after fork(), in child */ 4383 4384 static void … … 4424 4425 setsignal(SIGTERM); 4425 4426 } 4426 #if JOBS4427 /* For "jobs | cat" to work like in bash, we must retain list of jobs4428 * in child, but we do need to remove ourself */4429 if (jp)4430 freejob(jp);4431 #else4432 4427 for (jp = curjob; jp; jp = jp->prev_job) 4433 4428 freejob(jp); 4434 #endif4435 4429 jobless = 0; 4436 4430 } -
branches/stable/mindi-busybox/sysklogd/logger.c
r1770 r1842 108 108 if (!argc) { 109 109 #define strbuf bb_common_bufsiz1 110 while (fgets(strbuf, BUFSIZ, stdin)) {110 while (fgets(strbuf, COMMON_BUFSIZE, stdin)) { 111 111 if (strbuf[0] 112 112 && NOT_LONE_CHAR(strbuf, '\n') … … 118 118 } else { 119 119 char *message = NULL; 120 int len = 1; /* for NUL */120 int len = 0; 121 121 int pos = 0; 122 122 do { 123 123 len += strlen(*argv) + 1; 124 message = xrealloc(message, len );124 message = xrealloc(message, len + 1); 125 125 sprintf(message + pos, " %s", *argv), 126 126 pos = len; -
branches/stable/mindi/README.bkphw
r1770 r1842 27 27 echo /usr/local/lib >> /etc/ld.so.conf 28 28 ldconfig 29 perl -pi -e 's~^HOME=.*~HOME="/usr/local/bin"~' /usr/local/bin/cpqacuxe30 sed -i -e '/LD_LIBRARY_PATH/d' /usr/local/bin/cpqacuxe31 29 32 You also may have to remove the LD_ASSUME_KERNEL line in that script. 30 You're now ready to check your configuration by running: 31 mindi-bkphw /var/cache/mindi /etc/mindi 32 [First parameter is the directory where files will be generated, 33 Second parameter is the directory of the file proliant.files is located] 33 34 34 You're now ready to check your configuration by running mindi-bkphw. 35 For these tools to work you may have to install additional packages such as hpasm and hprsm from the HP Web site, as well as some libstdc++ compatibility packages (compat-libstdc++-33 and compat-libstdc++-296 on RHEL 5 e.g.) 35 36 36 37 In order to have a working hponcfg binary you also need to install the hprsm/hpasm packages from HP Web site. Refer to http://welcome.hp.com/country/us/en/support.html?pageDisplay=drivers -
branches/stable/mindi/deplist.txt
r1770 r1842 32 32 /usr/bin/strace 33 33 34 # For udev 35 /sbin/MAKEDEV 36 34 37 # For file command 35 38 /usr/share/misc/file/magic /usr/share/file/magic 36 39 37 # For swap uuid support and probably then more in the future40 # For swap uuid support, ia64 and probably then more in the future 38 41 /usr/bin/perl 42 # For menu management on ia64 43 efibootmgr 39 44 40 45 # For Debug mode -
branches/stable/mindi/distributions/conf/mindi.conf.dist
r1600 r1842 16 16 # Extra space for Ram disk 17 17 # 18 mindi_extra_space= 2457618 mindi_extra_space=32768 19 19 20 20 # … … 97 97 # 98 98 mindi_scsi_mods="3w-xxxx 3w_xxxx 3w-9xxx 3w_9xxx 53c7,8xx a100u2w a320raid aacraid adpahci advansys aha152x aha1542 aha1740 aic79xx aic79xx_mod aic7xxx aic7xxx_mod aic7xxx_old AM53C974 atp870u BusLogic cciss cpqfc dmx3191d dpt_i2o dtc eata eata_dma eata_pio fdomain gdth g_NCR5380 i2o_block i2o_core ide-scsi ieee1394 imm in2000 initio ips iscsi isp megaraid megaraid_mm megaraid_mbox megaraid_sas mptbase mptscsih mptsas mptspi mptfc mptscsi mptctl NCR53c406a ncr53c8xx nsp32 pas16 pci2000 pci2220i pcmcia ppa psi240i qla1280 qla2200 qla2300 qla2xxx qla2xxx_conf qlogicfas qlogicfc qlogicisp raw1394 scsi_debug scsi_mod scsi_transport_sas scsi_transport_spi sd_mod seagate sg sim710 sr_mod sym53c416 sym53c8xx sym53c8xx_2 t128 tmscsim u14-34f ultrastor wd7000 vmhgfs" 99 mindi_ide_mods="ide ide-generic ide-detect ide-mod ide-disk ide-cd ide_cd ide-cs ide-core ide_core edd paride ata_generic ata_piix libata via82cxxx generic nvidia ahci sata_nv cmd64x pata_amd pata_marvell "100 mindi_usb_mods="usb-storage usb-ohci usb-uhci usbcore usb_storage input hid uhci_hcd ehci_hcd uhci-hcd ehci-hcd ohci-hcd ohci_hcd usbkbd usbhid keybdev mousedev "99 mindi_ide_mods="ide ide-generic ide-detect ide-mod ide-disk ide-cd ide_cd ide-cs ide-core ide_core edd paride ata_generic ata_piix libata via82cxxx generic nvidia ahci sata_nv cmd64x pata_amd pata_marvell pata_serverworks" 100 mindi_usb_mods="usb-storage usb-ohci usb-uhci usbcore usb_storage input hid uhci_hcd ehci_hcd uhci-hcd ehci-hcd ohci-hcd ohci_hcd usbkbd usbhid keybdev mousedev libusual" 101 101 mindi_pcmcia_mods="pcmcia_core ds yenta_socket" 102 mindi_cdrom_mods="cdrom isocd isofs inflate_fs nls_iso8859-1 nls_cp437 sg sr_mod zlib_inflate"102 mindi_cdrom_mods="cdrom isocd isofs inflate_fs nls_iso8859-1 nls_cp437 nls_utf8 sg sr_mod zlib_inflate" 103 103 mindi_tape_mods="ht st osst ide-tape ide_tape" 104 104 mindi_net_mods="sunrpc nfs nfs_acl lockd fscache loop mii 3c59x e100 bcm5700 bnx2 e1000 eepro100 ne2k-pci tg3 pcnet32 8139cp 8139too 8390 forcedeth vmxnet vmnet" … … 108 108 # created for recovery time 109 109 # 110 mindi_deny_mods=" "110 mindi_deny_mods="kqemu" 111 111 # Replace with that line for HP OCMP e.g. 112 #mindi_deny_mods=" MPS_Driver_Mapper mps octtldrv tscttl streams"112 #mindi_deny_mods="kqemu MPS_Driver_Mapper mps octtldrv tscttl streams" 113 113 # 114 114 # Modules that SHOULD be part of the mini distribution -
branches/stable/mindi/install.sh
r1770 r1842 128 128 sed -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 129 129 sed -e "s~= "YYY"~= "$subconf"~" mindi-bkphw > $local/sbin/mindi-bkphw 130 sed -e "s~^my \$mindiconf=YYY~my \$mindiconf=\"$subconf\";~" mindi-bkphw > $local/sbin/mindi-bkphw131 chmod 755 $local/sbin/mindi $local/sbin/mindi-bkphw132 130 install -m 755 parted2fdisk.pl $local/sbin 133 131 … … 142 140 if [ "$ARCH" = "ia64" ] ; then 143 141 (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 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 152 145 else 153 146 # FHS requires fdisk under /sbin … … 156 149 ( cd $locallib/mindi/rootfs/sbin && ln -sf fdisk parted2fdisk) 157 150 fi 158 # Remove left parted2fdisk159 rm -f $locallib/mindi/rootfs/sbin/parted2fdisk-*160 151 161 152 if [ "$PKGBUILDMINDI" != "true" ]; then -
branches/stable/mindi/isolinux-H.cfg
r30 r1842 5 5 label RESTORE 6 6 kernel vmlinuz 7 append initrd=initrd.img load_ramdisk=1 prompt_ramdisk=0 ramdisk_size=24000 rw root=/dev/ram nuke restore7 append initrd=initrd.img load_ramdisk=1 prompt_ramdisk=0 ramdisk_size=24000 rw root=/dev/ram nuke RESTORE 8 8 label expert 9 9 kernel vmlinuz -
branches/stable/mindi/mindi
r1770 r1842 428 428 rmdir $mountpoint || LogIt "Cannot rmdir (CODI)" 429 429 } 430 430 431 431 432 # Last function called before exiting … … 659 660 fi 660 661 modpaths=`find $1 -name $2.*o -type f` 661 [ "$?" -ne "0" ] && Die "find $1 -name $2.o -type f --- failed"662 #[ "$?" -ne "0" ] && Die "find $1 -name $2.o -type f --- failed" 662 663 [ "$modpaths" = "" ] && modpaths=`find $1 -name $2.o.gz -type f` 663 664 [ "$modpaths" = "" ] && modpaths=`find $1 -name $2.ko.gz -type f` … … 956 957 grep -vx " *#.*" $MY_FSTAB | grep -vx " *none.*" | $AWK '/^\/dev\/[imhs]d||^LABEL=\/|^UUID=/ && !/fdd|cdr|zip|floppy/ {print $1}' 957 958 [ -e "/etc/raidtab" ] && $AWK '/^ *device/ {print $2}' /etc/raidtab 959 if [ -e "/vmfs/volumes" ]; then 960 # For VMWare ESX 3 get the device names of these volumes 961 vdf -P | grep -E '/vmfs/volumes' | awk '{print $1}' 962 fi 958 963 return 959 964 } … … 1003 1008 } 1004 1009 1005 1010 # 1011 # Critical function which computes all dependencies (dyn. lib.) 1012 # for a list of binaries 1013 # 1006 1014 LocateDeps() { 1007 1015 local incoming fname deps … … 1042 1050 fi 1043 1051 if [ -h "$d" ]; then 1044 echo "$link $d" 1052 echo "$link" 1053 echo "$d" 1045 1054 else 1046 1055 echo "$link" … … 1212 1221 [ "$c_p" = "none" ] && continue 1213 1222 redhat_label="" 1223 label="" 1214 1224 uuid="" 1215 1225 absolute_partition=`readlink -f $c_p` … … 1617 1627 LogIt "Failed to create ISO image." 1618 1628 else 1619 echo "Created bootable ISO image at $MINDI_CACHE/mindi.iso" >>$LOGFILE1629 echo "Created bootable ISO image at $MINDI_CACHE/mindi.iso" | tee -a $LOGFILE 1620 1630 fi 1621 1631 rm -f $MINDI_TMP/mkisofs.log … … 1627 1637 local i old_pwd 1628 1638 if [ "$PROMPT_MAKE_USB_IMAGE" = "yes" ] && [ _"$MONDO_SHARE" = _"" ]; then 1629 echo "Shall I make a bootable USB image ? (y/[n]"1639 echo -n "Shall I make a bootable USB image ? (y/[n]) " 1630 1640 read i 1631 1641 [ "$i" != "y" ] && [ "$i" != "Y" ] && return 0 … … 1898 1908 el=`find /boot/efi -name elilo.efi` 1899 1909 cp $el $mountpoint 1900 cp $liloconf $mountpoint /elilo.efi $mountpoint/efi/boot1910 cp $liloconf $mountpoint 1901 1911 if [ $mountefi -eq 1 ]; then 1902 1912 umount /boot/efi 2>&1 > /dev/null … … 1947 1957 echo "Free space left on image = $free_space KB" >> $LOGFILE 1948 1958 echo "Max kernel size on $BOOT_SIZE KB image (est'd) = $max_kernel_size K" >> $LOGFILE 1949 # make it bootable1959 # make it bootable 1950 1960 rm -f $mountpoint/zero 1951 1961 [ -e "$MINDI_LIB/memdisk" ] && cp -f $MINDI_LIB/memdisk $mountpoint 2>> $LOGFILE … … 1953 1963 if [ "$ARCH" != "ia64" ] ; then 1954 1964 $LILO_EXE -r $mountpoint >> $LOGFILE 2>> $LOGFILE 1965 else 1966 /bin/true 1955 1967 fi 1956 1968 else … … 2120 2132 done 2121 2133 for i in $EXTRA_MODS ; do 2122 j=`find lib/modules/$FAILSAFE_KVER -name $i.*o 2> /dev/null`2123 [ ! "$j" ] && echo "WARNING - cannot find failsafe module $i.o " >> $LOGFILE2134 j=`find lib/modules/$FAILSAFE_KVER -name $i.*o.gz 2> /dev/null` 2135 [ ! "$j" ] && echo "WARNING - cannot find failsafe module $i.o.gz" >> $LOGFILE 2124 2136 for k in $j ; do 2125 2137 if [ "`du -sk $k | cut -f1`" -lt "$CHOPSIZE" ] ; then … … 2210 2222 2211 2223 ProcessLDD() { 2212 local incoming f 2224 local incoming f d nd bd bnd 2213 2225 read incoming 2214 while [ "$incoming" != "" ] 2226 while [ "$incoming" != "" ]; do 2215 2227 # We take the full path name of the dyn. lib. we want 2216 2228 incoming=`echo "$incoming" | awk '{if (match($1,/\//)) {print $1} else {if (match($3,/\//)) print $3} fi}'` 2217 2229 for f in $incoming ; do 2230 # echo modified file name if one of the parent dir is a link 2231 # by replacing the original dirname by the destination of the link 2232 d="`dirname $f`" 2233 found="false" 2234 while [ "$d" != "/" ]; do 2235 if [ -h "$d" ]; then 2236 nd=`readlink -f $d` 2237 bd=`basename $d` 2238 bnd=`basename $nd` 2239 f=`echo $f | sed "s~/$bd/~/$bnd/~"` 2240 echo $d 2241 fi 2242 d="`dirname $d`" 2243 done 2244 2218 2245 echo "$f" 2219 2246 echo "`ReadAllLink $f`" … … 2590 2617 [ -e "/dev/.devfsd" ] && echo "/dev/.devfsd found" > tmp/USE-DEVFS 2591 2618 2619 # Handle the case where busybox is dynamically linked 2620 # Should be done first so that if /lib64 is a link, it's 2621 # created first like that, instead of as a real dir later on 2622 file $MINDI_LIB/rootfs/bin/busybox 2>&1 | grep -q "dynamically" 2623 if [ $? -eq 0 ]; then 2624 LocateDeps $MINDI_LIB/rootfs/bin/busybox > $MINDI_TMP/busy.lis 2625 cp --parents -Rdf `sort -u $MINDI_TMP/busy.lis` . 2626 rm -f $MINDI_TMP/busy.lis 2627 fi 2628 2592 2629 # Management of udev (which includes modprobe in rules) 2593 2630 ps auxww | grep -v grep | grep -qw udevd … … 2596 2633 LogIt "udev device manager found" 2597 2634 cp --parents -Rdf /etc/udev . 2> /dev/null 2635 # This avoids NIC remapping if on another machine at restore time on Debian at least 2636 rm -f ./etc/udev/rules.d/z25_persistent-net.rules 2598 2637 cp --parents -Rdf /lib/udev /lib64/udev . 2> /dev/null 2599 2638 if [ -x /sbin/udevd ]; then 2600 lis=`grep -Ev '^#' $MINDI_CONF/udev.files` 2639 lis2=`grep -Ev '^#' $MINDI_CONF/udev.files` 2640 lis="" 2641 # Get only the files which exist in that list 2642 # and potentially their symlink structure 2643 for i in $lis2; do 2644 if [ -h $i ]; then 2645 j=$i 2646 while [ -h $j ]; do 2647 lis="$lis $j" 2648 j=`readlink $j` 2649 done 2650 lis="$lis $j" 2651 elif [ -f $i ]; then 2652 lis="$lis $i" 2653 fi 2654 done 2655 # And their deps 2601 2656 LocateDeps $lis > $MINDI_TMP/udev.lis 2602 2657 for i in $lis; do … … 2614 2669 fi 2615 2670 fi 2671 2616 2672 # Management of potential HW info (Proliant only at the moment) 2673 rm -rf $MINDI_CACHE/bkphw 2617 2674 mindi-bkphw $MINDI_CACHE $MINDI_CONF | tee -a $LOGFILE 2618 2675 if [ -d $MINDI_CACHE/bkphw ]; then … … 2641 2698 cp --parents -Rdf /dev/fd0*[1,2][4,7,8]* . 2> /dev/null 2642 2699 2643 # Handle the case where busybox is dynamically linked2644 file $MINDI_LIB/rootfs/bin/busybox 2>&1 | grep -q "dynamically"2645 if [ $? -eq 0 ]; then2646 LocateDeps $MINDI_LIB/rootfs/bin/busybox > $MINDI_TMP/busy.lis2647 cp --parents -Rdf `sort -u $MINDI_TMP/busy.lis` .2648 rm -f $MINDI_TMP/busy.lis2649 fi2650 2700 cd $old_pwd 2651 2701 echo -en "..." … … 2689 2739 echo "Adding $i ($s KB) to the rootfs" >> $LOGFILE 2690 2740 cp --parents -pdf $i $mountpoint 2>/dev/null || LogIt "Unable to copy $i to $mountpoint" 2691 if [ "`echo "$i" | grep -F ".gz"`" ]; then 2741 # Uncompress modules if not useing udev and native modprobe 2742 if [ ! -f $mountpoint/tmp/USE-UDEV ]; then 2743 if [ "`echo "$i" | grep -F ".gz"`" ]; then 2692 2744 gunzip -f $mountpoint/$i 2693 i=`echo $i | sed 's/.gz//'` 2694 fi 2745 #i=`echo $i | sed 's/.gz//'` 2746 fi 2747 fi 2748 done 2749 2750 # Also copy modules.dep in case of udev so that normal modprobe works 2751 cp --parents -pdf /$floppy_modules_path/modules.dep $mountpoint 2>/dev/null || LogIt "Unable to copy modules.dep to $mountpoint" 2752 2753 # For all modules supported, create symlinks under the mountpoint 2754 for i in $EXTRA_MODS $NET_MODS $SCSI_MODS; do 2755 all_modules="$all_modules `FindSpecificModuleInPath $mountpoint $i | sed 's~^$mountpoint/~~g'`" 2756 done 2757 for i in $all_modules; do 2695 2758 (cd $mountpoint ; ln -s $i . 2>/dev/null) 2696 [ "`echo "$i" | grep -F ".gz"`" ] && gunzip -f $mountpoint/`basename $i` 2697 done 2698 # Also copy modules.dep in case of udev so that normal modprobe works 2699 p=`echo $i | cut -d/ -f1-3` 2700 cp -df $p/modules.dep $mountpoint/$p 2>/dev/null || LogIt "Unable to copy modules.dep to $mountpoint" 2759 done 2701 2760 if [ ! -e "/sbin/devfsd" ] || [ "$kernelpath" = "$MINDI_LIB/vmlinuz" ] ; then 2702 2761 echo "Deleting devfsd daemon from ramdisk" >> $LOGFILE … … 2724 2783 "ext2fs") 2725 2784 # say what will be used 2726 2785 echo "Creating an ext2 initrd image..." >> $LOGFILE 2727 2786 # kernel expects linuxrc in ext2 filesystem 2728 2787 ( cd $mountpoint && ln -sf sbin/init linuxrc ) … … 2730 2789 umount $mountpoint || Die "Cannot unmount $tempfile" 2731 2790 dd if=$tempfile bs=1k 2> /dev/null > ${rdz_fname}.tmp 2> /dev/null 2732 bs=`tune2fs -l ${rdz_fname}.tmp | grep -E '^Block size:' | cut -d: -f2 `2791 bs=`tune2fs -l ${rdz_fname}.tmp | grep -E '^Block size:' | cut -d: -f2 | sed 's/^ *//'` 2733 2792 ADDITIONAL_BOOT_PARAMS="$ADDITIONAL_BOOT_PARAMS ramdisk_blocksize=$bs" 2734 gzip - v9 ${rdz_fname}.tmp > $rdz_fname 2> /dev/null2793 gzip -c9 ${rdz_fname}.tmp > $rdz_fname 2735 2794 rm -f ${rdz_fname}.tmp 2736 2795 # log that we are done 2737 2796 echo "...done." >> $LOGFILE 2738 2797 ;; 2739 2798 "initramfs") 2740 2799 # say what will be used 2741 2800 echo "Creating a gzip'ed cpio (AKA initramfs) initrd image..." >> $LOGFILE 2742 2801 # make sure that cpio is there 2743 2802 which cpio &> /dev/null; [ $? -eq 0 ] || Die "cpio not found. Please install package cpio and try again." … … 2973 3032 echo "LVM set to $LVM" >> $LOGFILE 2974 3033 echo "----------" >> $LOGFILE 2975 echo "df result:" >> $LOGFILE2976 echo "----------" >> $LOGFILE2977 df -T >> $LOGFILE2978 echo "-------------" >> $LOGFILE2979 3034 echo "mount result:" >> $LOGFILE 2980 3035 echo "-------------" >> $LOGFILE … … 2997 3052 MODULES="`cat /proc/modules | awk '{print $1}'`" 2998 3053 if [ -x /usr/sbin/esxcfg-module ]; then 3054 echo "-------------" >> $LOGFILE 2999 3055 echo "VMWare ESX server detected - Enabling dedicated support" >> $LOGFILE 3000 3056 echo "-------------" >> $LOGFILE … … 3005 3061 fi 3006 3062 echo "-------------" >> $LOGFILE 3063 echo "df result:" >> $LOGFILE 3064 echo "----------" >> $LOGFILE 3065 df -T >> $LOGFILE 3066 echo "-------------" >> $LOGFILE 3007 3067 echo "Liste of extra modules is:" >> $LOGFILE 3008 3068 echo "$EXTRA_MODS" >> $LOGFILE … … 3010 3070 3011 3071 # Compute libata version 3012 laver=`modinfo libata | grep -Ei '^Version:' | cut -d: -f2 | cut -d. -f1 | sed 's/ *//g' `3072 laver=`modinfo libata | grep -Ei '^Version:' | cut -d: -f2 | cut -d. -f1 | sed 's/ *//g' 2> /dev/null` 3013 3073 # If libata v2 is used then remove ide-generic as it will perturbate boot 3014 3074 if [ "`echo $MODULES | grep libata`" ]; then … … 3079 3139 [ ! "$2" ] && Die "Please specify the binary to look at" 3080 3140 LocateDeps $2 3141 # Avoids logfile content for mondo 3142 export MONDO_SHARE="" 3143 MindiExit $? 3144 elif [ "$1" = "--readalllink" ] ; then 3145 [ ! "$2" ] && Die "Please specify the binary to look at" 3146 ReadAllLink $2 3081 3147 # Avoids logfile content for mondo 3082 3148 export MONDO_SHARE="" … … 3215 3281 if [ _"$MONDO_SHARE" != _"" ]; then 3216 3282 Die "Please use -k <path> to specify kernel." 3283 else 3284 USE_OWN_KERNEL="no" 3217 3285 fi 3218 3286 if [ "$INTERACTIVE" = "yes" ]; then -
branches/stable/mindi/mindi-bkphw
r1770 r1842 1 1 #!/usr/bin/perl -w 2 # 3 # $Id$ 2 4 # 3 5 # Backup the hardware configuration on machine supporting it … … 13 15 my $confdir = "$ARGV[1]"; 14 16 15 my $tool = "";16 my $tooldir = "";17 my $ret = 0;18 19 17 mkdir $bkpdir,0755 if (! -d $bkpdir) ; 20 open(SYSTEM," dmidecode -s 'system-product-name' |") || die "You needdmidecode for mindi hardware support";18 open(SYSTEM,"/usr/sbin/dmidecode -s 'system-product-name' |") || die "You need /usr/sbin/dmidecode for mindi hardware support"; 21 19 my $productname = <SYSTEM>; 22 20 close(SYSTEM); 23 21 22 die "No product name found for Hardware support\n" if (not defined $productname); 23 24 24 chomp($productname); 25 25 if ($productname =~ /proliant/i) { 26 print "Detected a n HP Hardware. Nice. Continue to support my job :-)\n";26 print "Detected a $productname. Nice. Continue to support my job :-)\n"; 27 27 print "Activating Proliant support for mindi\n"; 28 28 open(PROLIANT,"$confdir/proliant.files") || die "Unable to open $confdir/proliant.files"; 29 29 open(TOOLS,"> $bkpdir/../tools.files") || die "Unable to open $bkpdir/../tools.files"; 30 30 open(SCRIPT,"> $bkpdir/../mindi-rsthw") || die "Unable to open $bkpdir/../mindi-rsthw"; 31 print SCRIPT << "EOF";31 print SCRIPT << 'EOF'; 32 32 #!/bin/bash 33 33 # … … 38 38 # may have an impact on you restoration process 39 39 # 40 # put dynamic libraries at an accessible place 41 for l in /usr/local/lib/*; do 42 ln -sf $l /usr/lib 43 done 40 44 EOF 41 45 while($tool = <PROLIANT>) { … … 52 56 } 53 57 if ($tool =~ /\/conrep$/) { 54 $ret = system(" (cd $tooldir ; $tool -s -f$bkpdir/conrep.dat)");55 print SCRIPT "(cd $tooldir ; $tool - s -f$bkpdir/conrep.dat)");58 $ret = system("cd $tooldir ; $tool -s -f$bkpdir/conrep.dat"); 59 print SCRIPT "(cd $tooldir ; $tool -l -f$bkpdir/conrep.dat)\n"; 56 60 print TOOLS "$tool.xml\n"; 57 61 } 58 if ($tool =~ /\/cpqacuxe$/) { 59 $ret = system("$tool -c $bkpdir/cpqacuxe.dat"); 60 print SCRIPT "$tool -r $bkpdir/cpqacuxe.dat"); 62 if ($tool =~ /\/.acuxebin$/) { 63 my $dir=basename($tool); 64 $ret = system("export ACUXE_BIN_INSTALLATION_DIR=$dir ; export IM_CFGFILE_PATH=$dir ; export ACUXE_LOCK_FILES_DIR=$dir/locks ; $tool -c $bkpdir/cpqacuxe.dat"); 65 print SCRIPT "export ACUXE_BIN_INSTALLATION_DIR=$dir ; export IM_CFGFILE_PATH=$dir ; export ACUXE_LOCK_FILES_DIR=$dir/locks ; $tool -i $bkpdir/cpqacuxe.dat\n"; 61 66 print TOOLS "$tooldir/bld\n"; 62 67 } 63 68 if ($tool =~ /\/hponcfg$/) { 64 69 $ret = system("$tool -w $bkpdir/hponcfg.dat"); 65 print SCRIPT "$tool -r $bkpdir/hponcfg.dat ");70 print SCRIPT "$tool -r $bkpdir/hponcfg.dat\n"; 66 71 } 67 72 if ($tool =~ /\.scexe$/) { 68 print SCRIPT "$tool ");73 print SCRIPT "$tool\n"; 69 74 } 70 75 if ($ret != 0) { … … 77 82 } else { 78 83 print "No Hardware support for $productname\n"; 79 print " Ask your manufacturer to contribute to the mindi project\n";84 print "You may ask your manufacturer to contribute to the mindi project\n"; 80 85 } 81 86 rmdir $bkpdir if (-d $bkpdir) ; -
branches/stable/mindi/parted2fdisk.pl
r1570 r1842 38 38 my $arch; 39 39 my $fake = 0; 40 my $mega = 1048576; 40 41 41 42 # Determine on which arch we're running … … 165 166 if (defined $start{$part-1}) { 166 167 # in MB => cyl 167 $cylstart = sprintf("%d",$end{$part-1}* 1048576/$un + 1);168 $cylstart = sprintf("%d",$end{$part-1}*$mega/$un + 1); 168 169 print FLOG "no start cyl given for creation... assuming the following $cylstart\n"; 169 170 } else { … … 179 180 $start = 0.01; 180 181 } else { 181 $start = $cylstart* $un / 1048576 +0.001;182 $start = $cylstart* $un / $mega + 0.001; 182 183 } 183 184 # this is a size in B/KB/MB/GB … … 205 206 print FLOG "end cyl : $cylend\n"; 206 207 # parted needs MB 207 $end = $cylend * $un / 1048576;208 $end = $cylend * $un / $mega; 208 209 print FLOG "n $l $part $cylstart $cylend => mkpart primary $start $end\n"; 209 210 system "$parted -s $device mkpart primary ext2 $start $end\n" if ($fake == 0); … … 388 389 # start and end are in cylinder in fdisk format 389 390 # so return in MB * 1MB / what represents 1 cyl in B 390 $mstart = sprintf("%d",$$start{$n}* 1048576/$un);391 $mstart = sprintf("%d",$$start{$n}*$mega/$un); 391 392 $mstart = 1 if ($mstart < 1); 392 393 $mstart = $endmax if ($mstart > $endmax); 393 $mend = sprintf("%d",$$end{$n}* 1048576/$un - 1);394 $mend = sprintf("%d",$$end{$n}*$mega/$un - 1); 394 395 $mend = $endmax if ($mend > $endmax); 395 396 $mend = 1 if ($mend < 1); … … 497 498 my $mode; 498 499 my $size; 500 my $unit; 499 501 500 502 open (PARTED, "$parted -v |") || die "Unable to read from $parted"; … … 514 516 $mode=1; 515 517 } else { 516 # RHEL 3 parted <= 1.6.3 518 # RHEL 3 parted 1.6.3 519 # RHEL 4 parted 1.6.19 517 520 $mode=0; 518 521 } … … 528 531 if ($mode == 0) { 529 532 ($$start{$n},$$end{$n},$$type{$n},$void) = split(/ /,$d); 533 $unit = 1; 530 534 } elsif ($mode == 1) { 531 535 ($$start{$n},$$end{$n},$size,$$type{$n},$void) = split(/ /,$d); 536 $unit = $mega; 532 537 } else { 533 538 die "Undefined mode $mode"; … … 537 542 $$type{$n} = "" if (not defined $$type{$n}); 538 543 # Handles potential suffixes in latest parted version. Return MB 539 $ret = decode_Bsuf($$start{$n}, 1048576);544 $ret = decode_Bsuf($$start{$n},$unit); 540 545 $$start{$n} = $ret; 541 $ret = decode_Bsuf($$end{$n}, 1048576);546 $ret = decode_Bsuf($$end{$n},$unit); 542 547 $$end{$n} = $ret; 543 548 print FLOG "$n $$start{$n} $$end{$n} $$type{$n}\n"; … … 553 558 554 559 #print FLOG "decode_Bsuf input: $size / $unit "; 555 if ($size =~ /K B$/i) {556 $size =~ s/K B$//i;560 if ($size =~ /K[B]*$/i) { 561 $size =~ s/K[B]*$//i; 557 562 $size *= 1024; 558 } elsif ($size =~ /M B$/i) {559 $size =~ s/M B$//i;563 } elsif ($size =~ /M[B]*$/i) { 564 $size =~ s/M[B]*$//i; 560 565 $size *= 1048576; 561 } elsif ($size =~ /G B$/i) {562 $size =~ s/G B$//i;566 } elsif ($size =~ /G[B]*$/i) { 567 $size =~ s/G[B]*$//i; 563 568 $size *= 1073741824; 564 } elsif ($size =~ /T B$/i) {565 $size =~ s/T B$//i;569 } elsif ($size =~ /T[B]*$/i) { 570 $size =~ s/T[B]*$//i; 566 571 $size *= 1099511627776; 567 572 } else { -
branches/stable/mindi/proliant.files
r1770 r1842 1 1 /usr/local/bin/hponcfg 2 2 /usr/local/bin/conrep 3 /usr/local/bin/cpqacuxe/cpqacuxe 3 /opt/compaq/cpqacuxe/bld/.acuxebin 4 /usr/local/bin/bld/.acuxebin -
branches/stable/mindi/rootfs/etc/udev-links.conf
r1770 r1842 50 50 M tty7 c 4 7 51 51 M tty8 c 4 8 52 M ttyS0 c 4 64 53 M ttyS1 c 4 65 52 54 L console /dev/tty0 53 55 L tty /dev/tty0 -
branches/stable/mindi/rootfs/sbin/find-and-mount-cdrom
r1770 r1842 41 41 fi 42 42 LogIt "CD-ROM found at $device" 43 mount /mnt/cdrom43 mount /mnt/cdrom 44 44 if [ "$?" -ne "0" ] ; then 45 45 LogIt "Cannot mount /dev/cdrom (type $format) (dev=$device)" -
branches/stable/mindi/rootfs/sbin/init
r1770 r1842 78 78 openvt 6 /bin/sh 79 79 openvt 7 /bin/sh /sbin/wait-for-petris 80 openvt 8 /usr/bin/tail -f $LOGFILE 80 81 } 81 82 … … 155 156 156 157 HHandleCDROM() { 158 # Just in case we have an iLO ensure we will map it correctly 159 echo "$DENY_MODS" | grep -q "usb-storage " 160 if [ $? -eq 0 ]; then 161 return 162 fi 163 echo "Activating a potential USB Storage device" 164 if [ -f usb-storage.ko ] || [ -f usb-storage.ko.gz ]; then 165 if [ -e "/tmp/USE-UDEV" ] ; then 166 modprobe -q usb-storage 167 else 168 insmod usb-storage.ko* 169 fi 170 fi 171 for i in 1 2 3 4 5 6 7 8 9 10 ; do 172 sleep 1 173 echo -en "." 174 done 175 157 176 find-and-mount-cdrom 158 177 res=$? … … 171 190 CD_MOUNTED_OK="" 172 191 else 173 LogIt "OK, I am unable to go on. You seem to be missing a driver" 3 174 LogIt "Your archives are probably fine but" 3 175 LogIt "your tape streamer and/or CD-ROM drive are eccentric. :-)" 3 192 LogIt "OK, I am falling back to floppy mode." 3 193 LogIt "(You may not have the right drivers" 3 194 LogIt "to support the hardware on which we are running)" 3 195 LogIt "That means you'll have to copy the data disk images from" 3 196 LogIt "the CD/hard disk/whatever to physical 1.44MB disks and" 3 197 LogIt "insert them, one after the other. Please see the manual." 3 198 LogIt "The images are in /images on the CD, or /root/images/mindi" 3 199 LogIt "on your hard disk. Your archives are probably fine but" 3 200 LogIt "your tape streamer and/or CD-ROM drive are eccentric. :-)" 3 176 201 CD_MOUNTED_OK="" 177 202 fi … … 189 214 # Load the VIA IDE module first thing if it exists (requires ide-core). 190 215 # This is to ensure that DMA is working for VIA chipsets with 2.6 kernels. 191 for module in /ide-core.ko /via82cxxx.ko; do216 for module in /ide-core.ko* /via82cxxx.ko*; do 192 217 [ -f "$module" ] && MyInsmod $module > /dev/null 2> /dev/null 193 218 done … … 264 289 } 265 290 291 create_dev_makedev() { 292 if [ -e /sbin/MAKEDEV ]; then 293 ln -sf /sbin/MAKEDEV /dev/MAKEDEV 294 else 295 ln -sf /bin/true /dev/MAKEDEV 296 fi 297 } 266 298 267 299 RunUdevd() { … … 274 306 mount -n -t devpts -o mode=620 none /dev/pts 275 307 mount -n -t tmpfs none /dev/shm 308 if [ -e /proc/sys/kernel/hotplug ]; then 309 echo > /proc/sys/kernel/hotplug 310 fi 276 311 PKLVL=`cut -f1 /proc/sys/kernel/printk` 277 312 echo 0 > /proc/sys/kernel/printk … … 282 317 /sbin/udevd --daemon & 283 318 sleep 2 284 echo $PKLVL > /proc/sys/kernel/printk 319 mkdir -p /dev/.udev/queue/ 320 if [ -x /sbin/udevtrigger ]; then 321 /sbin/udevtrigger 322 fi 323 create_dev_makedev 285 324 # May avoid shell error messages 286 325 chmod 644 /dev/tty* 326 if [ -x /sbin/udevsettle ]; then 327 /sbin/udevsettle 328 fi 329 # It seems we need to have more static devs on some distro were 330 # udev as some other requirements to be covered later on. 331 # So in the mean time: 332 for d in `ls /dev.static`; do 333 if [ ! -e /dev/$d ]; then 334 mv /dev.static/$d /dev 335 fi 336 done 337 echo $PKLVL > /proc/sys/kernel/printk 287 338 } 288 339 … … 292 343 answer="NO" 293 344 345 grep -q nohw /proc/cmdline 346 if [ "$?" -eq 0 ]; then 347 return 348 fi 294 349 if [ -x ./mindi-rsthw ]; then 295 350 grep -q RESTORE /proc/cmdline 296 351 if [ "$?" -ne 0 ]; then 297 clear352 #clear 298 353 echo "*********************************************************************" 299 354 echo "Do you want to restore the HW configuration of the original machine ?" … … 333 388 fi 334 389 rm -f /tmp/FLF 390 } 391 392 StartUSBKbd() { 393 # Prepare minimal USB env in case we have USB kbd such as with iLO 394 [ -d /proc/bus/usb ] && ! grep -q /proc/bus/usb /proc/mounts && mount -t usbfs none /proc/bus/usb 395 echo "$DENY_MODS" | grep -Eq 'uhcd_hci |usbhid |usbcore ' 396 if [ $? -eq 0 ]; then 397 return 398 fi 399 if [ -e "/tmp/USE-UDEV" ] ; then 400 if [ -f uhcd_hci.ko ] || [ -f uhcd_hci.ko.gz ]; then 401 modprobe -q uhcd_hci 402 fi 403 if [ -f usbhid.ko ] || [ -f usbhid.ko.gz ]; then 404 modprobe -q usbhid 405 fi 406 else 407 if [ -f uhcd_hci.ko ]; then 408 insmod uhcd_hci.ko 409 fi 410 if [ -f usbhid.ko ]; then 411 insmod usbcore.ko 412 insmod usbhid.ko 413 fi 414 fi 335 415 } 336 416 … … 468 548 WelcomeMessage() 469 549 { 550 export ARCH=`uname -m` 551 470 552 echo "********************************************************************" 471 553 echo "MINDI-LINUX by Mondo Dev Team - web site: http://www.mondorescue.org" … … 490 572 } 491 573 574 ModprobeAllModules() { 575 576 for m in `find /lib/modules -name '*.ko*'`; do 577 j=`basename $m | sed 's/\.ko.*$//'` 578 echo "$DENY_MODS" | grep -q "$j " 579 if [ $? -eq 0 ]; then 580 echo "Denying $j..." 581 continue 582 fi 583 echo "Probing $j..." 584 modprobe -q $j 585 done 586 } 492 587 493 588 ExtractDataDisksAndLoadModules() { 494 589 echo "Installing additional tools ..." 495 590 install-additional-tools 496 echo "Inserting modules ..."497 591 # Keep the kernel silent again 498 592 PKLVL=`cut -f1 /proc/sys/kernel/printk` 499 593 echo 0 > /proc/sys/kernel/printk 500 insert-all-my-modules >> $LOGFILE 2>> $LOGFILE 594 if [ ! -e "/tmp/USE-UDEV" ] ; then 595 echo "Inserting modules ..." 596 insert-all-my-modules >> $LOGFILE 2>> $LOGFILE 597 for i in $FORCE_MODS; do 598 MyInsmod $i 599 done 600 else 601 ModprobeAllModules 602 fi 501 603 echo $PKLVL > /proc/sys/kernel/printk 502 604 } … … 524 626 mkdir /sys 2> /dev/null 525 627 mount /sys/ /sys -v -t sysfs 2>> $LOGFILE 628 # For ESX 3 629 [ -d /proc/vmware ] && ! grep -q /vmfs /proc/mounts && mount -t vmfs /vmfs /vmfs 526 630 rm -f /foozero 631 632 if [ "`grep -i denymods /proc/cmdline`" ]; then 633 export DENY_MODS="`cat /proc/cmdline | sed 's~.*denymods=\"\(.*\)\".*~\1~'` mondonone" 634 else 635 export DENY_MODS=" " 636 fi 637 638 if [ "`grep -i forcemods /proc/cmdline`" ]; then 639 export FORCE_MODS="`cat /proc/cmdline | sed 's~.*forcemods=\"\(.*\)\".*~\1~'` mondonone" 640 else 641 export FORCE_MODS=" " 642 fi 643 644 echo "Activating a potential USB keyboard/mouse" 645 StartUSBKbd 527 646 528 647 if [ -f /proc/sys/kernel/exec-shield ]; then … … 536 655 if [ -e "/tmp/USE-UDEV" ] ; then 537 656 RunUdevd 538 else 539 ExtractDevTarballs 540 fi 657 fi 658 ExtractDevTarballs 541 659 LaunchTerminals 542 660 … … 544 662 PKLVL=`cut -f1 /proc/sys/kernel/printk` 545 663 echo 0 > /proc/sys/kernel/printk 546 InsertEssentialModules 664 if [ ! -e "/tmp/USE-UDEV" ] ; then 665 InsertEssentialModules 666 else 667 ModprobeAllModules 668 fi 547 669 echo $PKLVL > /proc/sys/kernel/printk 548 670 549 671 EnableCcissIfAppropriate 550 RstHW551 672 #------------------------------- 552 673 #WHOLIVESINAPINEAPPLEUNDERTHESEA#;# --- don't touch this :) … … 590 711 RunDevfsd 591 712 fi 713 LoadKeymap 714 WelcomeMessage 715 RstHW 592 716 echo "Starting potential Raid/LVMs ..." 593 717 PauseForRaids … … 595 719 StartLvms 596 720 CopyBootDevEntry 597 LoadKeymap598 721 mkdir -p /tmp/tmpfs 599 722 sleep 2 … … 606 729 cp -af /dev/md2 /dev/md/2 2> /dev/null 607 730 fi 608 export ARCH=`uname -m`609 WelcomeMessage610 731 # SpaceTests; # Mandrake Linux 8.1 doesn't like this 611 732 [ -e "/tmp/mountlist.txt" ] && cp -f /tmp/mountlist.txt /tmp/mountlist.original … … 619 740 fi 620 741 hack-cfg-if-necessary || LogIt "Cannot find hack-cfg-if-necessary" 621 openvt 8 /usr/bin/tail -f $LOGFILE622 742 623 743 # Log some useful info 624 LogIt "init (from mindi v$MINDI_VER-r${MINDI_REV} "744 LogIt "init (from mindi v$MINDI_VER-r${MINDI_REV})" 625 745 LogIt "/proc/cmdline is:" 626 746 cat /proc/cmdline >> $LOGFILE -
branches/stable/mindi/rootfs/sbin/install-additional-tools
r1770 r1842 78 78 cd $mountdir 79 79 if [ -f etc/fstab ]; then 80 mvetc/fstab /tmp80 cp etc/fstab /tmp 81 81 fi 82 82 if [ -f etc/raidtab ]; then 83 mvetc/raidtab /tmp83 cp etc/raidtab /tmp 84 84 fi 85 85 -
branches/stable/mindi/rootfs/sbin/start-nfs
r1770 r1842 35 35 done 36 36 37 if [ "$ipdev" = "" ] && [ "$ipconf" = "" ]; then 38 # No network configuration neither stored during archive 39 # nor on cmdline so no network wanted => exiting 40 exit 0 41 else 37 if [ "$ipdev" != "" ] || [ "$ipconf" != "" ]; then 38 # Network configuration stored during archive 39 # or on cmdline so network wanted => starting it 42 40 LogIt "Starting Network..." 41 42 # Activate loobback 43 ifconfig lo 127.0.0.1 44 45 echo "$ipconf" | grep -q "dhcp" 46 if [ $? -eq 0 ]; then 47 ipdev=`echo $ipconf | cut -d: -f1` 48 LogIt "Making DHCP request on $ipdev" 49 udhcpc -i $ipdev 50 else 51 if [ "$ipconf" != "" ]; then 52 ipdev=`echo $ipconf | cut -d: -f1` 53 ipaddress=`echo $ipconf | cut -d: -f2` 54 ipnetmask=`echo $ipconf | cut -d: -f3` 55 ipbroadcast=`echo $ipconf | cut -d: -f4` 56 ipgateway=`echo $ipconf | cut -d: -f5` 57 fi 58 LogIt "Configuring $ipdev statically ($ipaddress/$ipnetmask)" 59 ifconfig $ipdev $ipaddress netmask $ipnetmask broadcast $ipbroadcast 60 route add default gw $ipgateway 61 fi 62 63 # ping server helps waking interface up 64 LogIt "Pinging NFS server..." 65 nfs_server_ipaddr=`echo $nfsmount | cut -d: -f1` 66 ping -c $ipcount $nfs_server_ipaddr 67 68 # Finally mounts the NFS share 69 LogIt "Mounting NFS share ($nfsmount) on /tmp/isodir..." 70 mount -t nfs -o nolock $nfsmount /tmp/isodir 71 72 LogIt "Mounting NFS image ${imgname}-1.iso in $dirimg on /mnt/cdrom in loopback" 73 mount -o ro -t iso9660 /tmp/isodir/$dirimg/${imgname}-1.iso /mnt/cdrom 43 74 fi 44 45 # Activate loobback46 ifconfig lo 127.0.0.147 48 echo "$ipconf" | grep -q "dhcp"49 if [ $? -eq 0 ]; then50 ipdev=`echo $ipconf | cut -d: -f1`51 LogIt "Making DHCP request on $ipdev"52 udhcpc -i $ipdev53 else54 if [ "$ipconf" != "" ]; then55 ipdev=`echo $ipconf | cut -d: -f1`56 ipaddress=`echo $ipconf | cut -d: -f2`57 ipnetmask=`echo $ipconf | cut -d: -f3`58 ipbroadcast=`echo $ipconf | cut -d: -f4`59 ipgateway=`echo $ipconf | cut -d: -f5`60 fi61 LogIt "Configuring $ipdev statically ($ipaddress/$ipnetmask)"62 ifconfig $ipdev $ipaddress netmask $ipnetmask broadcast $ipbroadcast63 route add default gw $ipgateway64 fi65 66 # ping server helps waking interface up67 LogIt "Pinging NFS server..."68 nfs_server_ipaddr=`echo $nfsmount | cut -d: -f1`69 ping -c $ipcount $nfs_server_ipaddr70 71 # Finally mounts the NFS share72 LogIt "Mounting NFS share ($nfsmount) on /tmp/isodir..."73 mount -t nfs -o nolock $nfsmount /tmp/isodir74 75 LogIt "Mounting NFS image ${imgname}-1.iso in $dirimg on /mnt/cdrom in loopback"76 mount -o ro -t iso9660 /tmp/isodir/$dirimg/${imgname}-1.iso /mnt/cdrom -
branches/stable/mindi/rootfs/sbin/start-usb
r1770 r1842 20 20 fi 21 21 22 [ -d /proc/bus/usb ] && ! grep -q /proc/bus/usb /proc/mounts && mount -t usbfs none /proc/bus/usb23 24 22 echo -en "Mounting USB device (${usbdev}1) on /mnt/cdrom..." 25 23 /sbin/modprobe usb-storage -
branches/stable/mindi/syslinux-H.cfg
r30 r1842 5 5 label RESTORE 6 6 kernel vmlinuz 7 append initrd=initrd.img ramdisk_size=24000 rw root=/dev/ram0 nuke restore7 append initrd=initrd.img ramdisk_size=24000 rw root=/dev/ram0 nuke RESTORE 8 8 label expert 9 9 kernel vmlinuz -
branches/stable/mindi/udev.files
r1770 r1842 12 12 /sbin/udevstart 13 13 /sbin/udevcontrol 14 /sbin/udevtrigger 15 /sbin/pam_console_apply 16 /bin/bash -
branches/stable/mondo/src/common/libmondo-devices.c
r1817 r1842 1871 1871 mr_asprintf(&tmp, "mount -t nfs -o nolock %s %s", bkpinfo->nfs_mount, 1872 1872 bkpinfo->isodir); 1873 run_program_and_log_output(tmp, 5);1873 run_program_and_log_output(tmp, 3); 1874 1874 mr_free(tmp); 1875 1875 malloc_string(g_selfmounted_isodir); -
branches/stable/mondo/src/common/libmondo-files.c
r1769 r1842 1107 1107 * networking will not start during an NFS restore. 1108 1108 * 1109 * If the NFS device in nfs_dev begins with the word "bond", 1109 * If the NFS device in nfs_dev begins with the word "bond", or alb or aft 1110 1110 * look for the corresponding slave ethN device and copy it to nfs_dev. 1111 1111 * Using the common MAC address 1112 1112 ********/ 1113 if (!strncmp(nfs_dev, "bond", 4) ) {1113 if (!strncmp(nfs_dev, "bond", 4) || !strncmp(nfs_dev, "alb", 3) || !strncmp(nfs_dev, "aft", 3)) { 1114 1114 log_to_screen("Found bonding device %s; looking for corresponding ethN slave device\n", nfs_dev); 1115 1115 mr_asprintf(&command, -
branches/stable/mondo/src/common/libmondo-fork.c
r1693 r1842 19 19 //static char cvsid[] = "$Id$"; 20 20 21 extern char *g_tmpfs_mountpt;22 21 extern t_bkptype g_backup_media_type; 23 22 extern bool g_text_mode; -
branches/stable/mondo/src/common/libmondo-tools.c
r1817 r1842 1105 1105 if (tmp[0]) { 1106 1106 log_it("/boot is at %s according to /etc/fstab", tmp); 1107 if ((strstr(tmp, "LABEL=") || strstr(tmp,"UUID="))) { 1108 if (!run_program_and_log_output("mount /boot", 5)) { 1109 strcpy(g_boot_mountpt, "/boot"); 1110 mr_msg(1, "Mounted /boot"); 1107 mr_asprintf(&command, "mount | grep -Ew '/boot'"); 1108 mr_asprintf(&tmp1, call_program_and_get_last_line_of_output(command)); 1109 mr_free(command); 1110 if (!strcmp(tmp1,"")) { 1111 if ((strstr(tmp1, "LABEL=") || strstr(tmp1,"UUID="))) { 1112 if (!run_program_and_log_output("mount /boot", 5)) { 1113 strcpy(g_boot_mountpt, "/boot"); 1114 log_msg(1, "Mounted /boot"); 1115 } 1111 1116 } else { 1112 1117 log_it("...ignored cos it's a label or uuid :-)"); 1113 1118 } 1119 mr_free(tmp1); 1114 1120 } else { 1121 mr_free(tmp1); 1115 1122 mr_asprintf(&command, "mount | grep -E '^%s'", tmp); 1116 1123 mr_msg(3, "command = %s", command); … … 1133 1140 mr_msg(1, 1134 1141 "Plan B failed. Unable to mount /boot for backup purposes. This probably means /boot is mounted already, or doesn't have its own partition."); 1142 } 1135 1143 } 1136 1144 } -
branches/stable/mondo/src/mondoarchive/mondo-cli.c
r1817 r1842 25 25 extern bool g_text_mode; 26 26 extern char g_startdir[MAX_STR_LEN]; ///< ????? @bug ????? 27 extern char g_tmpfs_mountpt[MAX_STR_LEN];28 27 extern bool g_sigpipe; 29 28 -
branches/stable/mondo/src/mondoarchive/mondoarchive.c
r1770 r1842 43 43 extern char *g_boot_mountpt; 44 44 extern bool g_remount_cdrom_at_end, g_remount_floppy_at_end; 45 extern char *g_tmpfs_mountpt;46 45 extern char *g_cdrw_drive_is_here; 47 46 extern double g_kernel_version; -
branches/stable/mondo/src/mondorestore/mondo-prep.c
r1770 r1842 1925 1925 } else if (strcmp(format, "minix") == 0) { 1926 1926 mr_asprintf(&partcode, "81"); 1927 } else if (strcmp(format, "vmfs ") == 0) {1927 } else if (strcmp(format, "vmfs3") == 0) { 1928 1928 strcpy(partcode, "fb"); 1929 } else if (strcmp(format, "vmkcore") == 0) { 1930 strcpy(partcode, "fc"); 1929 1931 } else if (strcmp(format, "raid") == 0) { 1930 1932 mr_asprintf(&partcode, "fd"); -
branches/stable/mondo/src/mondorestore/mondo-restore-EXT.h
r1663 r1842 8 8 extern bool g_ISO_restore_mode; /* are we in Iso Mode? */ 9 9 extern bool g_I_have_just_nuked; 10 extern char *g_tmpfs_mountpt;11 10 extern char *g_isodir_device; 12 11 extern char *g_isodir_format; -
branches/stable/mondo/src/mondorestore/mondo-rstr-tools.c
r1770 r1842 458 458 mr_msg(1, 459 459 "That's OK. I called mount w/o a filesystem type and it worked fine in the end."); 460 } else { 461 log_to_screen("Unable to mount device %s at %s", device, 462 mountdir); 460 463 } 461 464 } … … 475 478 /************************************************************************** 476 479 *END_MOUNT_DEVICE * 477 480 **************************************************************************/ 478 481 479 482 … … 500 503 sizeof(struct mountlist_itself)); 501 504 sort_mountlist_by_mountpoint(mountlist, 0); 505 502 506 503 507 mvaddstr_and_log_it(g_currentY, 0, _("Mounting devices ")); … … 545 549 } 546 550 close_progress_form(); 547 run_program_and_log_output("df -m", TRUE);548 551 if (retval) { 549 552 if (g_partition_table_locked_up > 0) { 550 553 log_to_screen 551 (_ 552 ("fdisk's ioctl() call to refresh its copy of the partition table causes the kernel to")); 553 log_to_screen(_ 554 ("lock up the partition table. You might have to reboot and use Interactive Mode to")); 555 log_to_screen(_ 556 ("format and restore *without* partitioning first. Sorry for the inconvenience.")); 554 (_("fdisk's ioctl() call to refresh its copy of the partition table causes the kernel to")); 555 log_to_screen 556 (_("lock up the partition table. You might have to reboot and use Interactive Mode to")); 557 log_to_screen 558 (_("format and restore *without* partitioning first. Sorry for the inconvenience.")); 557 559 } 558 560 mr_asprintf(&tmp, _("Could not mount devices %s- shall I abort?"), … … 563 565 retval = 0; 564 566 log_to_screen 565 (_ 566 ("Continuing, although some devices failed to be mounted")); 567 (_("Continuing, although some devices failed to be mounted")); 567 568 mvaddstr_and_log_it(g_currentY++, 74, _("Done.")); 568 569 } else { … … 580 581 return (retval); 581 582 } 582 583 584 585 586 587 /* 583 /************************************************************************** 584 *END_MOUNT_ALL_DEVICES * 585 **************************************************************************/ 586 587 588 /** 588 589 * Mount the CD-ROM or USB device at /mnt/cdrom. 589 590 * @param bkpinfo The backup information structure. Fields used: … … 594 595 * @return 0 for success, nonzero for failure. 595 596 */ 596 int mount_media()597 597 { 598 598 char *mount_cmd = NULL; … … 655 655 } else if (bkpinfo->backup_media_type == usb) { 656 656 mr_asprintf(&mount_cmd, "mount -t vfat %s %s", bkpinfo->media_device, MNT_CDROM); 657 } else if (strstr(bkpinfo->media_device, "/dev/")) 657 } else if (strstr(bkpinfo->media_device, "/dev/")) { 658 658 #ifdef __FreeBSD__ 659 {660 659 mr_asprintf(&mount_cmd, "mount_cd9660 -r %s %s", bkpinfo->media_device, 661 660 MNT_CDROM); 662 }663 661 #else 664 {665 662 mr_asprintf(&mount_cmd, "mount %s -t iso9660 -o ro %s", 666 663 bkpinfo->media_device, MNT_CDROM); 667 }668 664 #endif 669 670 else { 665 } else { 671 666 if (bkpinfo->disaster_recovery 672 667 && does_file_exist("/tmp/CDROM-LIVES-HERE")) { … … 704 699 mr_msg(2, "Mounted media OK"); 705 700 } 701 706 702 return (res); 707 703 } -
branches/stable/mondo/src/restore-scripts/mondo/label-partitions-as-necessary
r1770 r1842 33 33 elif [ "$format" = "swap" ] ; then 34 34 if [ "$opttun" = "-U" ]; then 35 LogIt "Creating uuid $label on swap partition $ label"35 LogIt "Creating uuid $label on swap partition $mountpt" 36 36 echo -n "$label" | perl -ne 's/-//g;chomp;print pack "H*",$_' | dd conv=notrunc "of=$mountpt" obs=1 seek=1036 37 37 else -
branches/stable/pbconf/mindi-busybox/deb/docs
r1674 r1842 1 1 README 2 2 INSTALL 3 svn.log -
branches/stable/pbconf/mindi-busybox/deb/rules
r1766 r1842 58 58 # - copy doc 59 59 mkdir -p debian/doc-temp 60 cp -a ChangeLog INSTALL LICENSE AUTHORS README TODO svn.log debian/doc-temp60 cp -a ChangeLog INSTALL LICENSE AUTHORS README TODO NEWS debian/doc-temp #svn.log 61 61 62 62 dh_install -s -
branches/stable/pbconf/mindi-busybox/rpm/mindi-busybox.spec
r1770 r1842 35 35 %files 36 36 %defattr(-,root,root) 37 %doc ChangeLog INSTALL LICENSE AUTHORS README TODO svn.log 37 %doc ChangeLog INSTALL LICENSE AUTHORS README TODO NEWS 38 #svn.log 38 39 %{_libdir}/mindi 39 40 -
branches/stable/pbconf/mindi/deb/control
r1674 r1842 8 8 Package: PBPKG 9 9 Architecture: amd64 i386 ia64 10 Depends: binutils, bzip2, dosfstools, mkisofs, module-init-tools, syslinux, gawk, parted, ms-sys, file, nano11 Recommends: cpio, mdadm, ntfsprogs 10 Depends: binutils, bzip2, dosfstools, mkisofs, module-init-tools, syslinux, gawk, parted, file, mtools, perl, mindi-busybox 11 Recommends: cpio, mdadm, ntfsprogs, nano, ms-sys 12 12 Suggests: eject, less, acl, attr, lilo 13 13 Description: creates boot/root disks based on your system -
branches/stable/pbconf/mindi/deb/docs
r1674 r1842 5 5 TODO 6 6 INSTALL 7 svn.log -
branches/stable/pbconf/mindi/deb/mindi.docs
r1770 r1842 6 6 README.pxe 7 7 README.bkphw 8 svn.log 8 NEWS 9 AUTHORS -
branches/stable/pbconf/mindi/rpm/mindi.spec
r1770 r1842 13 13 # BuildArch: noarch 14 14 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -u -n) 15 Requires: bzip2 >= 0.9, mkisofs, ncurses, binutils, gawk, dosfstools, mindi-busybox, parted, PBDEP15 Requires: bzip2 >= 0.9, mkisofs, ncurses, binutils, gawk, dosfstools, mindi-busybox, parted, perl, mtools, PBDEP 16 16 PBOBS 17 17 # Not on all systems … … 50 50 %defattr(-,root,root) 51 51 %config(noreplace) %{_sysconfdir}/%{name} 52 %doc ChangeLog INSTALL COPYING README TODO README.ia64 README.pxe README.busybox README.proliant README.bkphw svn.log 52 %doc ChangeLog INSTALL COPYING README TODO README.ia64 README.pxe README.busybox README.proliant README.bkphw NEWS 53 #svn.log 53 54 %{_mandir}/man8/* 54 55 %{_libdir}/%{name} -
branches/stable/pbconf/mondo/deb/mondo.docs
r581 r1842 2 2 TODO 3 3 README 4 svn.log 4 AUTHORS -
branches/stable/pbconf/mondo/rpm/mondo.spec
r1663 r1842 75 75 %config %{_sysconfdir}/%{name}/%{name}.conf.dist 76 76 %config %{_sysconfdir}/%{name}/%{name}.conf.dist.md5 77 %doc ChangeLog svn.log 77 %doc ChangeLog 78 #svn.log 78 79 %doc INSTALL COPYING README TODO AUTHORS NEWS 79 80 %doc docs/en/mondorescue-howto.html docs/en/mondorescue-howto.pdf -
branches/stable/pbconf/mondorescue.pb
r1770 r1842 35 35 # a QEMU rhel_3 here means that the VM will be named rhel_3.qemu 36 36 # 37 vmlist mondorescue = mandrake_10.1,mandrake_10.2,mandriva_2006.0,mandriva_2007.0,mandriva_2007.1,mandriva_2008.0,redhat_7.3,redhat_9,fedora_4,fedora_5,fedora_6,fedora_7, rhel_2.1,rhel_3,rhel_4,rhel_5,suse_10.0,suse_10.1,suse_10.2,suse_10.3,sles_9,sles_10,debian_3.1,debian_4.0,ubuntu_6.06,ubuntu_7.04,ubuntu_7.10,gentoo_nover,slackware_10.2,slackware_11.0,freebsd_5.537 vmlist mondorescue = mandrake_10.1,mandrake_10.2,mandriva_2006.0,mandriva_2007.0,mandriva_2007.1,mandriva_2008.0,redhat_7.3,redhat_9,fedora_4,fedora_5,fedora_6,fedora_7,fedora_8,rhel_2.1,rhel_3,rhel_4,rhel_5,suse_10.0,suse_10.1,suse_10.2,suse_10.3,sles_9,sles_10,debian_3.1,debian_4.0,ubuntu_6.06,ubuntu_7.04,ubuntu_7.10,gentoo_nover,slackware_10.2,slackware_11.0,freebsd_5.5 38 38 39 39 # … … 56 56 vmpath mondorescue = /users/qemu 57 57 58 testver mondorescue = true 59 projver mondorescue = stable 60 projtag mondorescue = 1 58 61 59 62 # Hash of default package/package directory … … 61 64 defpkgdir mindi = mindi 62 65 63 pkgver mindi = 2.0.064 pkgver mindi-busybox = 1.7.266 pkgver mindi = stable 67 pkgver mindi-busybox = stable 65 68 #pkgtag mindi-busybox = 2 66 69
Note:
See TracChangeset
for help on using the changeset viewer.