Changeset 3563 in MondoRescue
- Timestamp:
- Apr 11, 2016, 7:43:30 PM (9 years ago)
- Location:
- branches/3.0-mindi-2.1/mindi
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.0-mindi-2.1/mindi/analyze-my-lvm
r3561 r3563 13 13 GetValueFromField() { 14 14 local res 15 grep -i "$2" "$1" | perl -p i-e 's/\s*(.*)\s\s\s+(.+)$/$2/;s/\sT[i]*B/t/;s/\sG[i]*B/g/;s/\sM[i]*B/m/;s/\sK[i]*B/k/'15 grep -i "$2" "$1" | perl -p -e 's/\s*(.*)\s\s\s+(.+)$/$2/;s/\sT[i]*B/t/;s/\sG[i]*B/g/;s/\sM[i]*B/m/;s/\sK[i]*B/k/' 16 16 } 17 17 … … 75 75 fi 76 76 77 echo "# $LVMCMD echo y |lvcreate$params -n $logical_volume $volume_group"77 echo "# echo y | $LVMCMD lvcreate$params -n $logical_volume $volume_group" 78 78 } 79 79 -
branches/3.0-mindi-2.1/mindi/deplist.d/ProLiant.conf
r3094 r3563 7 7 /usr/sbin/hpacuscripting 8 8 /opt/compaq/hpacucli/bld/.hpacuscripting 9 /opt/compaq/hpacucli/bld/libcpqimgr-x86_64.so 9 10 /sbin/hponcfg 10 11 # XML file under /opt/hp/hp-scripting-tools/etc/conrep.xml -
branches/3.0-mindi-2.1/mindi/deplist.d/base.conf
r2964 r3563 40 40 /usr/bin/setfacl 41 41 42 # 43 /bin/lsblk 44 42 45 # On RHEL 43 46 /usr/bin/bzip2 -
branches/3.0-mindi-2.1/mindi/deplist.d/lvm.conf
r2465 r3563 93 93 /usr/sbin/lvs 94 94 /usr/sbin/lvscan 95 96 /usr/sbin/lvmetad -
branches/3.0-mindi-2.1/mindi/deplist.d/minimal.conf
r3561 r3563 54 54 # Required by ssh as dlopened 55 55 /lib/libnss_compat.so 56 /lib64/libnss_compat.so 56 57 /usr/lib/libnss_compat.so 57 58 /usr/lib64/libnss_compat.so 58 59 /lib/libnss_files.so 60 /lib64/libnss_files.so 59 61 /usr/lib/libnss_files.so 60 62 /usr/lib64/libnss_files.so -
branches/3.0-mindi-2.1/mindi/deplist.d/udev.conf
r3172 r3563 15 15 /sbin/udev.static 16 16 /sbin/udevsend 17 /sbin/biosdevname 17 18 /etc/udev 18 19 /etc/hotplug.d 20 21 /usr/sbin/dmeventd 22 /usr/bin/systemctl 19 23 20 24 # On ArchLinux … … 23 27 24 28 # Systemd 25 /usr/lib/systemd/systemd-udevd 29 /etc/systemd 30 /usr/lib/systemd 31 /usr/lib/kernel 32 /usr/lib/tmpfiles.d 33 /var/lib/systemd 34 /usr/share/systemd 35 /usr/sbin/runlevel 36 /usr/sbin/udevadm 37 /usr/sbin/halt 38 /usr/bin/bootctl 39 /usr/bin/halt 40 /usr/bin/hostnamectl 41 /usr/bin/journalctl 42 /usr/bin/kernel-install 43 /usr/bin/localectl 44 /usr/bin/loginctl 45 /usr/bin/machinectl 46 /usr/bin/poweroff 47 /usr/bin/reboot 48 /usr/bin/systemd 49 /usr/bin/systemd-analyze 50 /usr/bin/systemd-ask-password 51 /usr/bin/systemd-cat 52 /usr/bin/systemd-cgls 53 /usr/bin/systemd-cgtop 54 /usr/bin/systemd-coredumpctl 55 /usr/bin/systemd-delta 56 /usr/bin/systemd-detect-virt 57 /usr/bin/systemd-inhibit 58 /usr/bin/systemd-machine-id-setup 59 /usr/bin/systemd-notify 60 /usr/bin/systemd-nspawn 61 /usr/bin/systemd-run 62 /usr/bin/systemd-stdio-bridge 63 /usr/bin/systemd-tmpfiles 64 /usr/bin/systemd-tty-ask-password-agent 65 /usr/bin/timedatectl 66 67 # systemd needs dbus 68 /usr/bin/dbus-daemon 69 /usr/bin/dbus-launch 70 /etc/dbus-1 71 /usr/share/dbus-1 72 /var/run/dbus 73 /usr/lib64/dbus-1 74 /usr/bin/dbus-binding-tool 75 /usr/bin/dbus-cleanup-sockets 76 /usr/bin/dbus-monitor 77 /usr/bin/dbus-send 78 /usr/bin/dbus-uuidgen 26 79 27 80 /sbin/udevstart.static -
branches/3.0-mindi-2.1/mindi/install.sh
r3173 r3563 54 54 MANDIR=${HEAD}$MANDIR/man8 55 55 fi 56 if [ _"$SBINDIR" = _"" ]; then 57 subsbin=$sublocal/sbin 58 SBINDIR=$local/sbin 59 else 60 subsbin=$SBINDIR 61 SBINDIR=${HEAD}$SBINDIR 62 fi 56 63 if [ _"$DOCDIR" = _"" ]; then 57 64 DOCDIR=$local/share/doc/mindi-$MINDIVER … … 70 77 71 78 echo "Creating target directories ..." 72 install -m 755 -d $conf $locallib/mindi $MANDIR $ local/sbin$CACHEDIR $conf/deplist.d79 install -m 755 -d $conf $locallib/mindi $MANDIR $SBINDIR $CACHEDIR $conf/deplist.d 73 80 74 81 echo "Copying files ..." … … 83 90 84 91 # Substitute variables for mindi 85 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/mindi86 chmod 755 $ local/sbin/mindi92 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 > $SBINDIR/mindi 93 chmod 755 $SBINDIR/mindi 87 94 install -m 644 mindi.8 $MANDIR 88 95 89 96 # Manage perl script man pages 90 97 for s in mindi-bkphw mindi-get-perl-modules parted2fdisk.pl; do 91 install -m 755 $s $ local/sbin92 pod2man -c "$s a MondoRescue tool" --section=8 --release="$VERSTR" $ local/sbin/$s > $s.898 install -m 755 $s $SBINDIR 99 pod2man -c "$s a MondoRescue tool" --section=8 --release="$VERSTR" $SBINDIR/$s > $s.8 93 100 install -m 644 $s.8 $MANDIR 94 101 # Generate the list of perl modules needed at restore time for mindi 95 cat > $conf/perl-scripts << EOF96 $sub local/sbin/$s102 cat >> $conf/perl-scripts << EOF 103 $subsbin/$s 97 104 EOF 98 105 done 99 (cd $MANDIR ; ln -s parted2fdisk.pl.8 parted2fdisk.9)106 (cd $MANDIR ; if [ ! -f parted2fdisk.9 ]; then ln -s parted2fdisk.pl.8 parted2fdisk.9; fi) 100 107 101 108 if [ "_$PREFIX" = "_" ] && [ ! -f $locallib/mindi/rootfs/bin/busybox ]; then … … 105 112 # Managing parted2fdisk 106 113 if [ "$ARCH" = "ia64" ] ; then 107 (cd $local/sbin && ln -sf parted2fdisk.pl parted2fdisk) 108 install -s -m 755 $local/sbin/parted2fdisk.pl $locallib/mindi/rootfs/sbin/parted2fdisk 114 (cd $SBINDIR && ln -sf parted2fdisk.pl parted2fdisk && install -m 755 $SBINDIR/parted2fdisk.pl $locallib/mindi/rootfs/sbin/parted2fdisk) 109 115 else 110 116 # FHS requires fdisk under /sbin 111 (cd $ local/sbin&& ln -sf ../../sbin/fdisk parted2fdisk)117 (cd $SBINDIR && ln -sf ../../sbin/fdisk parted2fdisk) 112 118 echo "Symlinking fdisk to parted2fdisk" 113 119 ( cd $locallib/mindi/rootfs/sbin && ln -sf fdisk parted2fdisk) … … 116 122 if [ "$PKGBUILDMINDI" != "true" ]; then 117 123 chown -R root:root $locallib/mindi $conf # $DOCDIR 118 chown root:root $ local/sbin/mindi $MANDIR/mindi.8 $locallib/mindi/analyze-my-lvm $local/sbin/parted2fdisk.pl124 chown root:root $SBINDIR/mindi $MANDIR/mindi.8 $locallib/mindi/analyze-my-lvm $SBINDIR/parted2fdisk.pl 119 125 if [ "$ARCH" = "ia64" ] ; then 120 chown root:root $ local/sbin/parted2fdisk126 chown root:root $SBINDIR/parted2fdisk 121 127 fi 122 128 fi -
branches/3.0-mindi-2.1/mindi/parted2fdisk.pl
r3143 r3563 4 4 # 5 5 # parted2fdisk: fdisk like interface for parted 6 # [develop ped for mindi/mondo http://www.mondorescue.org]6 # [developed for mindi/mondo http://www.mondorescue.org] 7 7 # 8 8 # Aims to be architecture independant (i386/ia64) 9 9 # Tested on ia64 with RHAS 2.1 - Mandrake 9.0 - RHEL 3.0 - SLES 10 10 10 # 11 # Copyright B. Cornec 2000-201 311 # Copyright B. Cornec 2000-2015 12 12 # Provided under the GPL v2 13 13 14 14 use strict; 15 use File::Basename; 15 16 16 17 … … 19 20 =head1 NAME 20 21 21 parted2fdisk is a fdisk li e command using parted internally.22 parted2fdisk is a fdisk like command using parted internally. 22 23 23 24 =head1 DESCRIPTION 24 25 25 parted2fdisk behaves like a fdisk command, but dialog internally with parted in order to manipulate partiion tables, which allow it to support GPT partition format as well as MBR, contrary to fdisk. It aimed at providing compatible external interface wti fdisk. Developed initialy for ia64 Linux, but is also useful now on x86 systems using GPT partition format (for large HDDs).26 parted2fdisk behaves like the fdisk command, but dialog internally with parted in order to manipulate partition tables, which allow it to support GPT partition format as well as MBR, contrary to fdisk. It aims at providing compatible external interface with fdisk. Developed initialy for ia64 Linux, it is also useful now on x86 systems using GPT partition format (for large HDDs). 26 27 27 28 =head1 SYNOPSIS … … 96 97 97 98 my $fdisk = "/sbin/fdisk"; 99 $fdisk = "/usr/sbin/fdisk" if (not -x "/sbin/fdisk"); 98 100 my $parted = "/sbin/parted"; 101 $parted = "/usr/sbin/parted" if (not -x "/sbin/parted"); 99 102 100 103 my $i; … … 152 155 "ext4" => "83", 153 156 "xfs" => "83", 157 "btrfs" => "83", 154 158 "reiserfs" => "83", 155 159 "linux-swap" => "82", 156 160 "lvm" => "8e", 161 "raid" => "fd", 157 162 "" => "", 158 163 ); … … 434 439 "linux-swap" => "Linux swap", 435 440 "lvm" => "Linux LVM", 441 "raid" => "RAID Linux auto", 436 442 "fat16" => "fat16", 437 443 "fat32" => "fat32", … … 478 484 479 485 # This will return MB 480 get_parted 486 get_parted($device,$start,$end,\%type); 481 487 482 488 while (($n,$d) = each %type) { … … 674 680 } 675 681 676 677 # Based on Version 2.4 27-Sep-1996 Charles Bailey bailey@genetics.upenn.edu678 # in Basename.pm679 680 sub basename {681 682 my($fullname) = shift;683 684 my($dirpath,$basename);685 686 ($dirpath,$basename) = ($fullname =~ m#^(.*/)?(.*)#s);687 688 return($basename);689 }690 691 682 sub myexit { 692 683 -
branches/3.0-mindi-2.1/mindi/rootfs/etc/group
r1733 r3563 17 17 cdrom::24: 18 18 tape::26: 19 lock::54: 19 20 plugdev::46: 20 21 audio::81: … … 24 25 fuse::106: 25 26 nogroup::65534: 27 rpc:x:491: 28 rpcuser:x:490: 29 messagebus:x:499: 30 dbus:x:81: 31 polkitd:x:998 -
branches/3.0-mindi-2.1/mindi/rootfs/etc/init.d/rcS
r3172 r3563 5 5 # init script launched during the restore process 6 6 #------------------------------------------------------------ 7 8 7 9 8 CaughtSoftReset() { … … 53 52 mount / -o rw,remount > /dev/null 2> /dev/null 54 53 for i in `cat /proc/cmdline`; do 55 56 57 58 59 60 61 elif [[ $console != "" && -e$console ]]; then62 setsid sh -c "exec sh <$console >$console 2>&1"63 64 65 54 echo $i | grep -qi console= && console=`echo $i | cut -d= -f2` 55 echo $i | grep -qi serial= && serial=`echo $i | cut -d= -f2` 56 done 57 LogIt "Launching Shell" 58 if [[ $serial != "" && -e $serial ]]; then 59 setsid sh -c "exec sh <$serial >$serial 2>&1" 60 elif [[ $console != "" && -e /dev/$console ]]; then 61 setsid sh -c "exec sh </dev/$console >/dev/$console 2>&1" 62 else 63 setsid sh -c "exec sh </dev/tty1 >/dev/tty1 2>&1" 64 fi 66 65 } 67 66 … … 75 74 ExtractDevTarballs() { 76 75 cd / 77 for fname in ataraid.tgz ida.tgz i2o.tgz rd.tgz raw.tgz cciss.tgz nst.tgz dm.tgz vc.tgz ; do 78 if [ ! -e "/$fname" ] ; then 79 LogIt "/$fname not found; cannot extract to /." 1 80 else 81 echo -en "\rExtracting /$fname... " 82 tar -zxf /$fname || LogIt "Error occurred while extracting /$fname" 83 fi 84 done 76 if [ -x /usr/lib/systemd/systemd-udevd ]; then 77 # Just use vc dev files. The other are useless and create huge delays with LVM 78 tar -zxf /vc.tgz || LogIt "Error occurred while extracting /vc.tgz" 79 else 80 for fname in ataraid.tgz ida.tgz i2o.tgz rd.tgz raw.tgz cciss.tgz nst.tgz dm.tgz vc.tgz ; do 81 if [ ! -e "/$fname" ] ; then 82 LogIt "/$fname not found; cannot extract to /." 1 83 else 84 echo -en "\rExtracting /$fname... " 85 tar -zxf /$fname || LogIt "Error occurred while extracting /$fname" 86 fi 87 done 88 fi 85 89 echo -en "\r" 86 90 LogIt "Extracted additional /dev entries OK. " 1 … … 98 102 opt="-c" 99 103 fi 104 echo "Launching terminals on other ttys - Use ALT+F[2-6] to use them" 100 105 openvt $opt 2 /bin/sh 101 106 openvt $opt 3 /bin/sh … … 105 110 openvt $opt 7 /bin/sh /sbin/wait-for-petris 106 111 openvt $opt 8 /usr/bin/tail -f $LOGFILE 107 openvt $opt 9 /usr/bin/tail -f /var/log/messages 112 if [ -f /var/log/messages ]; then 113 openvt $opt 9 /usr/bin/tail -f /var/log/messages 114 fi 108 115 # May avoid shell error messages 109 116 chmod 666 /dev/tty* /dev/console 110 117 # By default first serial line is configured as tty 111 # Required to have a correct serial console support (MP on ia64 or VSP with iLO 2e.g.)118 # Required to have a correct serial console support (MP on ia64 or VSP with iLO e.g.) 112 119 for i in `cat /proc/cmdline` ; do 113 120 echo $i | grep -qi serial= && serial=`echo $i | cut -d= -f2` 114 121 done 115 122 # Doing that is only valid when using a real serial line 116 if [ -f $serial]; then123 if [[ $serial != "" && -e $serial ]]; then 117 124 LogIt "Redirecting serial $serial to /dev/tty" 1 118 125 ln -s -f $serial /dev/tty … … 288 295 fi 289 296 if [ "$res" -eq "0" ] ; then 290 LogIt "OK, I am running on a CD-ROM. Good." 3297 LogIt "OK, I am running on a CD-ROM. Good." 1 291 298 CD_MOUNTED_OK=yes 292 299 else 293 LogIt "You probably not have the right drivers" 3294 LogIt "to support the hardware on which we are running" 3295 LogIt "Your archives are probably fine but" 3296 LogIt "your tape streamer and/or CD-ROM drive are unsupported at that point." 3300 LogIt "You probably not have the right drivers" 1 301 LogIt "to support the hardware on which we are running" 1 302 LogIt "Your archives are probably fine but" 1 303 LogIt "your tape streamer and/or CD-ROM drive are unsupported at that point." 1 297 304 CD_MOUNTED_OK="" 298 305 fi … … 324 331 if [ ! -e "/dev/.devfsd" ] ; then 325 332 mount -t devfs devfs /dev 2>> $LOGFILE 326 327 LogIt "Error while trying to mount devfs"333 if [ "$?" -ne "0" ] ; then 334 LogIt "Error while trying to mount devfs" 328 335 else 329 LogIt "Devfs mounted OK"336 LogIt "Devfs mounted OK" 330 337 fi 331 338 fi … … 372 379 373 380 RunUdevd() { 374 # Inspiration from Mandriva 2008.0 startup script 375 echo "Preparing udev environment..." 376 LogIt "Preparing udev environment..." 381 # Initial Inspiration from Mandriva 2008.0 startup script 382 LogIt "Preparing udev environment..." 1 377 383 mv /dev /dev.static 378 384 mkdir /dev 379 mount -n -o size=5M,mode=0755 -t tmpfs none /dev 380 MakeExtraNodes 381 mount -n -t devpts -o mode=620 none /dev/pts 385 # Contributed during LinuxCon Japan ! 386 if [ -x /usr/lib/systemd/systemd-udevd ]; then 387 mount -n -t devtmpfs none /dev 388 else 389 mount -n -o size=5M,mode=0755 -t tmpfs none /dev 390 MakeExtraNodes 391 mount -n -t devpts -o mode=620 none /dev/pts 392 fi 393 mkdir -p /dev/shm 382 394 mount -n -t tmpfs none /dev/shm 383 395 if [ -e /proc/sys/kernel/hotplug ]; then … … 396 408 ps | grep -v grep |grep udevd 2> /dev/null 1> /dev/null 397 409 if [ $? -ne 0 ]; then 410 echo "Waiting for udev to start..." 398 411 if [ -x /sbin/udevd ]; then 399 412 /sbin/udevd --daemon & … … 401 414 /usr/bin/udevd --daemon & 402 415 elif [ -x /usr/lib/systemd/systemd-udevd ]; then 403 /usr/lib/systemd/systemd-udevd -daemon & 404 fi 405 echo "Waiting for udev to start..." 416 # from https://github.com/hut/minirc/blob/master/rc 417 echo "INFO: This is the systemd version of udev" 418 # Contributed during LinuxCon Japan 419 #mount -n -t tmpfs tmpfs /sys/fs/cgroup 420 #mount -n -t cgroup cgroup /sys/fs/cgroup/systemd 421 mkdir -p /run/udev 422 mkdir -p /run/systemd/journal 423 /usr/lib/systemd/systemd-udevd --daemon 424 udevadm trigger --action=add --type=subsystems 425 udevadm trigger --action=add --type=devices 426 fi 406 427 sleep 5 407 LogIt "udev started manually" 428 LogIt "udev started manually" 1 408 429 fi 409 430 mkdir -p /dev/.udev/queue/ … … 481 502 fi 482 503 if [ -e "/tmp/i-want-my-lvm" ] ; then 504 # Recent LVM need this caching daemon to work 505 if [ -x /usr/sbin/lvmetad ]; then 506 mkdir -p /run/lvm 507 /usr/sbin/lvmetad 508 fi 483 509 LogIt "Scanning LVM's..." 1 484 510 if which lvm ; then … … 494 520 for d in $MINDI_EXCLUDE_DEVS ; do 495 521 echo "LVM exclusion == $d" 522 # LVM: $4 to be checked if changed 496 523 EXCLUDE_VGS=`grep " $d" /tmp/i-want-my-lvm | grep vgcreate | awk '{print $4}'` 497 524 vg=`echo $EXCLUDE_VGS | sed "s/ /|/g"` … … 508 535 echo "vgcfgrestore $v" >> /tmp/restorevgs 509 536 # Remove LVs from mountlist 537 # LVM: sed to be checked if changed 510 538 EXCLUDE_LVS=`grep " $v" /tmp/i-want-my-lvm | grep lvcreate | sed "s/^.*-n \([^ ][^ ]*\) .*$/$1/"` 511 539 for l in $EXCLUDE_LVS; do 512 540 # FIXME: Should search for all possible device names here 513 grep -Ev "/dev/$v/$l" /tmp/mountlist.txt > /tmp/mountlist.txt.new 514 grep -Ev "/dev/mapper/${v}-$l" /tmp/mountlist.txt.new > /tmp/mountlist.txt 541 if [ -f "/tmp/mountlist.txt" ]; then 542 grep -Ev "/dev/$v/$l" /tmp/mountlist.txt > /tmp/mountlist.txt.new 543 grep -Ev "/dev/mapper/${v}-$l" /tmp/mountlist.txt.new > /tmp/mountlist.txt 544 fi 515 545 done 516 546 done 517 547 done 518 548 549 # LVM: remove # 519 550 grep -E "^#.*vgchange" /tmp/i-want-my-lvm | sed "s/^#[ ]*//" > /tmp/start-lvm 520 551 chmod +x /tmp/start-lvm … … 577 608 return; 578 609 fi 579 if [ "`grep mpath /tmp/mountlist.txt`" ]; then610 if [ -f "/tmp/mountlist.txt" ] && [ "`grep mpath /tmp/mountlist.txt`" ]; then 580 611 if [ -x /sbin/multipath ]; then 581 612 echo "Starting Mpath..." … … 602 633 fi 603 634 604 raid_devices=`grep /dev/md /tmp/mountlist.txt | cut -d' ' -f1` 635 if [ -f "/tmp/mountlist.txt" ]; then 636 raid_devices=`grep /dev/md /tmp/mountlist.txt | cut -d' ' -f1` 637 else 638 raid_devices="" 639 fi 640 605 641 if which raidstart > /dev/null 2> /dev/null ; then 606 642 for i in $raid_devices ; do … … 693 729 umount /tmp/tmpfs > /dev/null 2> /dev/null 694 730 rmdir /tmp/tmpfs 695 ln -sf /mnt/RESTORING/tmp /tmp/tmpfs; # used by mondo -restore731 ln -sf /mnt/RESTORING/tmp /tmp/tmpfs; # used by mondorestore 696 732 LogIt "Failed to mount /tmp/tmpfs; using ugly softlink instead" 697 733 else … … 845 881 export PATH GROOVY USER LOGFILE ARCH 846 882 883 mount -o remount,rw / 884 rm -f $LOGFILE 885 886 mkdir /proc 2> /dev/null 887 mount /proc /proc -t proc 888 889 # Creates log file 890 LogIt "" 891 # Backup fd 892 exec 4>&2 5>&1 893 # Redirect every message to the LOGFILE 894 exec > >(tee -a ${LOGFILE}) 895 exec 2> >(tee -a ${LOGFILE} >&2) 896 847 897 echo "Welcome to init (from mindi ${MINDI_VER}-r${MINDI_REV})" 848 898 849 mount -o remount rw / 899 mkdir /sys 2> /dev/null 900 mount /sys /sys -t sysfs 901 850 902 [ ! "$GROOVY" ] && Die "I'm not groovy!" 851 903 for i in $GROOVY /mnt/cdrom /mnt/isodir /var/local/petris /tmp/isodir; do 852 904 mkdir -p $i 853 905 done 854 #/bin/update855 mkdir /proc 2> /dev/null856 mount /proc/ /proc -v -t proc857 mkdir /sys 2> /dev/null858 mount /sys/ /sys -v -t sysfs 2>> $LOGFILE859 906 # For ESX 3 860 907 [ -d /proc/vmware ] && ! grep -q /vmfs /proc/mounts && mount -t vmfs /vmfs /vmfs … … 879 926 for d in $MINDI_EXCLUDE_DEVS ; do 880 927 echo "Mountlist exclusion == $d" 881 perl -i -ne 'print $_ unless m~$d~' /tmp/mountlist.txt 928 if [ -e "/tmp/mountlist.txt" ]; then 929 perl -i -ne 'print $_ unless m~$d~' /tmp/mountlist.txt 930 fi 882 931 done 883 932 else … … 902 951 LaunchTerminals 903 952 904 # Keeping kernel silent 953 # Keeping kernel silent for module insertion 905 954 PKLVL=`cut -f1 /proc/sys/kernel/printk` 906 955 echo 0 > /proc/sys/kernel/printk … … 916 965 LogIt "Warning - /tmp/mondo-restore.cfg not found" 917 966 fi 918 if [ "`grep -i pxe /proc/cmdline`" ] || [ "`grep -i net /proc/cmdline`" ] ; then967 if [ "`grep -i pxe /proc/cmdline`" ] || [ "`grep -i net /proc/cmdline`" ] || [ "`grep 'netfs-proto ' /tmp/mondo-restore.cfg`" ]; then 919 968 # We need to get here exported variables from start-netfs 920 969 . /sbin/start-netfs … … 941 990 HandleCDROM 942 991 ExtractDataDisksAndLoadModules 943 # We need to get here exported variables from start-netfs944 . /sbin/start-netfs945 992 fi 946 993 res=$? … … 965 1012 sleep 2 966 1013 #clear 967 if [ -e "/dev/md0" ] && [ ! -e "/dev/md/0" ] && [ "`grep /dev/md/ /tmp/mountlist.txt`" != "" ] ; then1014 if [ -e "/dev/md0" ] && [ ! -e "/dev/md/0" ] && [ -e "/tmp/mountlist.txt" ] && [ "`grep /dev/md/ /tmp/mountlist.txt`" != "" ] ; then 968 1015 LogIt "Creating /dev/md/* softlinks just in case." 1 969 1016 mkdir -p /dev/md … … 1044 1091 LogIt "Calling post-init" 1045 1092 # start-netfs moved it under /tmp as the NFS share is already unmounted 1046 if [ "`echo $pre | grep -E '^/tmp/isodir'`" ]; then1093 if [ _"$pre" != _"" ] && [ "`echo $pre | grep -E '^/tmp/isodir'`" ]; then 1047 1094 pre=`echo $pre | sed 's|^/tmp/isodir|/tmp|'` 1048 1095 fi 1049 if [ -x $pre ]; then1096 if [ _"$pre" != _"" ] && [ -x $pre ]; then 1050 1097 echo "Executing preliminary script $pre" 1051 1098 LogIt "Executing preliminary script $pre" … … 1059 1106 if [ "`grep -i "post=" /proc/cmdline`" ] ; then 1060 1107 for i in `cat /proc/cmdline` ; do 1061 1108 echo $i | grep -qi post= && post=`echo $i | cut -d= -f2` 1062 1109 done 1063 1110 # start-netfs moved it under /tmp as the NFS share is already unmounted -
branches/3.0-mindi-2.1/mindi/rootfs/etc/passwd
r2953 r3563 13 13 rpcuser:x:491:490:system user for nfs-utils:/var/lib/nfs:/bin/false 14 14 nobody:x:65534:100:nobody:/dev/null: 15 messagebus:x:499:499:system user for dbus:/:/sbin/nologin 16 dbus:x:81:81:system user for dbus:/:/sbin/nologin 17 polkitd:x999:998:polkitd:/:/sbin/nologin -
branches/3.0-mindi-2.1/mindi/rootfs/etc/shadow
r2425 r3563 1 1 root:*:13956:0:99999:7::: 2 halt:*:13956:0:99999:7::: 3 operator:*:13956:0:99999:7::: 4 shutdown:*:13956:0:99999:7::: 5 sync:*:13956:0:99999:7::: 2 6 bin:*:13956:0:99999:7::: 7 ftp:*:13956:0:99999:7::: 3 8 daemon:*:13956:0:99999:7::: 4 9 adm:*:13956:0:99999:7::: … … 12 17 operator:*:13956:0:99999:7::: 13 18 games:*:13956:0:99999:7::: 19 rpc:*:13956:0:99999:7::: 20 rpcuser:*:13956:0:99999:7::: 14 21 nobody:*:13956:0:99999:7::: 22 messagebus:*:13956:0:99999:7::: 23 dbus:*:13956:0:99999:7::: 24 polkitd:*:13956:0:99999:7::: -
branches/3.0-mindi-2.1/mindi/rootfs/etc/udev-links.conf
r2441 r3563 19 19 M ppp c 108 0 20 20 M loop0 b 7 0 21 M loop1 b 7 1 22 M loop2 b 7 2 21 23 D net 22 24 M net/tun c 10 200 … … 36 38 M lp0 c 6 0 37 39 M rawctl c 162 0 40 M kmsg c 1 11 38 41 # sometimes, nvidia driver is slow to create these devices and X failed to start: 39 42 M nvidia0 c 195 0 … … 56 59 57 60 M null c 1 3 61 M zero c 1 5 62 M random c 1 8 63 M urandom c 1 9 64 M ram0 c 1 0 65 M ram1 c 1 1 66 M ram2 c 1 2 58 67 M fuse c 10 229 -
branches/3.0-mindi-2.1/mindi/rootfs/sbin/find-and-mount-cdrom
r2878 r3563 1 1 #!/bin/sh 2 2 # 3 # $Id$ 4 # 3 5 4 6 TryToFindCDROM() { -
branches/3.0-mindi-2.1/mindi/rootfs/sbin/post-init
r2915 r3563 5 5 #------------------------------------------------------------ 6 6 7 8 sleep 1 9 10 echo "Here is my /tmp/mountlist.txt" >> $LOGFILE 11 cat /tmp/mountlist.txt >> $LOGFILE 7 if [ -f "/tmp/mountlist.txt" ]; then 8 echo "Here is my /tmp/mountlist.txt" >> $LOGFILE 9 cat /tmp/mountlist.txt >> $LOGFILE 10 fi 12 11 13 12 iso=`grep iso /proc/cmdline` … … 68 67 fi 69 68 69 # Now suppress msg redirection to avoid poluting log file 70 exec 2>&4 >&5 4>&- 5>&- 71 70 72 if [ "$compare" ] ; then 71 73 LogIt "------------------COMPARE MODE-----------------" 1 -
branches/3.0-mindi-2.1/mindi/rootfs/sbin/start-netfs
r3178 r3563 70 70 71 71 # If same system, map to the right MAC address 72 hwaddr_found=`ifconfig $ipdev | /bin/grep HWaddr | awk '{print $NF}'` 73 if [ "$hwaddr" != "$hwaddr_found" ]; then 74 ipdev_new=`ifconfig -a | /bin/grep $hwaddr | awk '{print $1}'` 75 if [ "$ipdev_new" != "" ]; then 76 LogIt "Interface $ipdev changed to $ipdev_new (MAC: $hwaddr)" 77 ipdev=$ipdev_new 78 else 79 LogIt "NOTE: Interface $ipdev kept despite it doesn't match the $hwaddr MAC address" 72 if [ "$hwaddr" != "" ]; then 73 hwaddr_found=`ifconfig $ipdev | grep HWaddr | awk '{print $NF}'` 74 if [ "$hwaddr" != "$hwaddr_found" ]; then 75 ipdev_new=`ifconfig -a | grep $hwaddr | awk '{print $1}'` 76 if [ "$ipdev_new" != "" ]; then 77 LogIt "Interface $ipdev changed to $ipdev_new (MAC: $hwaddr)" 78 ipdev=$ipdev_new 79 else 80 LogIt "NOTE: Interface $ipdev kept despite it doesn't match the $hwaddr MAC address" 81 fi 80 82 fi 81 83 fi … … 115 117 elif [ "$proto" = "smbfs" ]; then 116 118 LogIt "Mounting SMBFS share ($netfsmount) on /tmp/isodir..." 117 mount -t cifs $netfs opt $netfsmount /tmp/isodir -o ro119 mount -t cifs $netfsmount /tmp/isodir -o ro $netfsopt 118 120 elif [ "$proto" != "" ]; then 119 121 if [ -x /sbin/rpcbind ]; then 120 "Startng rpcbind daemon..."121 /sbin/rpcbind &122 echo "Starting rpcbind daemon..." 123 /sbin/rpcbind -w & 122 124 fi 123 125 LogIt "Mounting Network share ($netfsmount) on /tmp/isodir..."
Note:
See TracChangeset
for help on using the changeset viewer.