Changeset 2538 for devel


Ignore:
Timestamp:
Jan 9, 2010, 4:40:44 PM (9 years ago)
Author:
bruno
Message:

r3572@localhost: bruno | 2010-01-07 23:38:36 +0100
Reorg of files begining to start working on LVM low level fundtions and scripts

Location:
devel
Files:
1 deleted
4 edited
1 moved

Legend:

Unmodified
Added
Removed
  • devel/mindi/Makefile.PL

    r2149 r2538  
    88    DISTNAME     => 'PBPKG',
    99    VERSION      => 'PBVER',
    10     INST_SCRIPT  => 'blib/bin',
     10    INST_SCRIPT  => 'blib/sbin',
    1111    INSTALLDIRS  => 'perl',
    1212    PREREQ_PM    => {
     
    1414            #Template                         => 0,
    1515    },    # e.g., Module::Name => 1.1
    16     #ABSTRACT_FROM => 'bin/pb',   # retrieve abstract from module
     16    #ABSTRACT_FROM => 'sbin/mindi',   # retrieve abstract from module
    1717    AUTHOR        => 'Bruno Cornec <bruno#mondorescue.org>',
    1818    EXE_FILES     => [ qw( sbin/mindi sbin/mranalyze-lvm sbin/mrprepare-lvm ) ],
  • devel/mindi/post-install.sh

    r2149 r2538  
    44#
    55
    6 if [ ! -f "mindi" ] ; then
    7     echo "Please 'cd' to the directory you have just untarred." >> /dev/stderr
    8     exit 1
    9 fi
    10 
    116if [ "_$PREFIX" != "_" ]; then
    127    local=${HEAD}$PREFIX
    138    sublocal=$PREFIX
    149    if [ "_$CONFDIR" != "_" ]; then
    15         conf=${HEAD}$CONFDIR/PBPROJ
    16         subconf=$CONFDIR/PBPROJ
     10        conf=${HEAD}$CONFDIR/PBPKG
     11        subconf=$CONFDIR/PBPKG
    1712    else
    1813        echo "CONFDIR should be defined if PREFIX is defined"
     
    2217    local=/usr/local
    2318    sublocal=$local
    24     if [ -f /usr/bin/mindi ]; then
    25         echo "WARNING: /usr/bin/mindi exists. You should probably remove the mindi package !"
    26     fi
    27     conf=$local/etc/PBPROJ
     19    conf=$local/etc/PBPKG
    2820    subconf=$conf
    2921fi
    3022
    3123if [ _"$CACHEDIR" = _"" ]; then
    32     CACHEDIR=$local/var/cache/mindi
     24    CACHEDIR=$local/var/cache/PBPKG
    3325else
    3426    CACHEDIR=${HEAD}$CACHEDIR
    3527fi
    36 locallib=$local/share/lib
    37 sublocallib="$locallib/PBPROJ"
    38 
    39 
    40 if uname -a | grep Knoppix > /dev/null || [ -e "/ramdisk/usr" ] ; then
    41     local=/ramdisk/usr
    42     sublocal=$local
    43     conf=/ramdisk/etc
    44     subconf=$conf
    45     export PATH=/ramdisk/usr/sbin:/ramdisk/usr/bin:/$PATH
    46 fi
     28sublocalshare="$local/share/PBPKG"
     29sublocallib="$local/lib/PBPKG"
    4730
    4831MINDIVER=PBVER
     
    5235
    5336echo "Creating target directories ..."
    54 install -m 755 -d $conf $sublocallib $CACHEDIR
     37install -m 755 -d $conf $sublocallib $sublocalshare $CACHEDIR
    5538
    56 echo "Copying files ..."
    57 cp -af rootfs $sublocallib/mindi
    58 chmod 755 $sublocallib/mindi/rootfs/sbin/*
    59 install -m 644 msg-txt dev.tgz $sublocallib/mindi
    60 install -m 644 deplist.txt udev.files proliant.files $conf
     39#echo "Copying files ..."
     40#cp -af rootfs $sublocallib/mindi
     41#chmod 755 $sublocallib/mindi/rootfs/sbin/*
     42#install -m 644 msg-txt dev.tgz $sublocallib/mindi
     43#install -m 644 deplist.txt udev.files proliant.files $conf
    6144
    6245# Substitute variables for mindi
    6346sed -i -e "s~^MINDI_PREFIX=XXX~MINDI_PREFIX=$sublocal~" -e "s~^MINDI_CONF=YYY~MINDI_CONF=$subconf~" -e "s~^MINDI_LIB=LLL~MINDI_LIB=$sublocallib~" $local/bin/mindi
    64 sed -i -e "s~= "YYY"~= "$subconf"~" $local/bin/mindi-bkphw
    65 install -m 755 parted2fdisk.pl $local/sbin
    66 
    67 # Managing parted2fdisk
    68 if [ "$ARCH" = "ia64" ] ; then
    69     (cd $local/sbin && ln -sf parted2fdisk.pl parted2fdisk)
    70     install -s -m 755 $local/sbin/parted2fdisk.pl $locallib/mindi/rootfs/sbin/parted2fdisk
    71     # Try to avoid the need ot additional perl modules at the moment
    72     perl -pi -e 's/use strict;//' $locallib/mindi/rootfs/sbin/parted2fdisk
    73 else
    74     # FHS requires fdisk under /sbin
    75     (cd $local/sbin && ln -sf /sbin/fdisk parted2fdisk)
    76     echo "Symlinking fdisk to parted2fdisk"
    77     ( cd $locallib/mindi/rootfs/sbin && ln -sf fdisk parted2fdisk)
    78 fi
     47#sed -i -e "s~= "YYY"~= "$subconf"~" $local/bin/mindi-bkphw
    7948
    8049if [ "$PKGBUILDMINDI" != "true" ]; then
    8150    chown -R root:root $sublocallib/mindi $conf
    82     chown root:root $local/sbin/parted2fdisk.pl
    83     if [ "$ARCH" = "ia64" ] ; then
    84         chown root:root $local/sbin/parted2fdisk
    85     fi
    8651fi
    8752
  • devel/mindi/sbin/mranalyze-lvm

    r2149 r2538  
    141141}
    142142
    143 my $ret = mr_lvm_analyze($OUTPUT);
     143my $lvmver = mr_lvm_analyze($OUTPUT);
    144144
    145 if ($ret == 0) {
     145if ($lvmver == 0) {
    146146    pb_log(1,"No LVM handling")
    147147} else {
  • devel/mr/lib/MondoRescue/Base.pm

    r2149 r2538  
    2828
    2929our @ISA = qw(Exporter);
    30 our @EXPORT = qw(mr_exit);
     30our @EXPORT = qw(mr_init mr_exit);
    3131
    3232=pod
     
    4444=over 4
    4545
     46=item B<mr_init>
     47
     48This function initialize MondoRescue, point to the right conf files, setup stuff
     49It takes 1 parameter, the message to print if needed
     50
     51=cut
     52
     53sub mr_exit {
     54
     55my $msg = shift || "";
     56
     57if (defined $msg) {
     58    pb_log($pbdebug,$msg);
     59}
     60
     61pb_conf_init();
     62}
    4663=item B<mr_exit>
    4764
Note: See TracChangeset for help on using the changeset viewer.