Changeset 3763 in /cluster/svnroot


Ignore:
Timestamp:
Jul 24, 2012 2:43:16 PM (8 years ago)
Author:
mmludin08
Message:

merge in changes for milestone:3.1.1

Location:
bccd-ng/tags/bccd-3.1.1-rc
Files:
13 deleted
47 edited
45 copied

Legend:

Unmodified
Added
Removed
  • bccd-ng/tags/bccd-3.1.1-rc

  • bccd-ng/tags/bccd-3.1.1-rc/CHANGELOG

    r3493 r3763  
     1= 3.1.1 (24 Jul 2012) =
     2        * Added New Modules to the ~/bccd
     3        * Upgraded most of the software modules
     4        * See the Milestone for bccd-3.1.1
     5        * See trac/bccd-3..1.1 for more changes
     6
     7
    18= 3.1.0 (30 Nov 2011) =
    29 * Upgrade userspace from Debian Lenny to Debian Squeeze
  • bccd-ng/tags/bccd-3.1.1-rc/bin/build_bootable_USB.sh

    r2977 r3763  
    66# education.
    77#
    8 # Copyright (C) 2010 Andrew Fitz Gibbon, Paul Gray, Kevin Hunter, Dave Joiner,
     8# Copyright (C) 2012 Andrew Fitz Gibbon, Paul Gray, Kevin Hunter, Dave Joiner,
    99#   Sam Leeman-Munk, Tom Murphy, Charlie Peck, Skylar Thompson, & Aaron Weeden
    1010
     
    2222# You should have received a copy of the GNU General Public License
    2323# along with this program.  If not, see <http://www.gnu.org/licenses/>.
     24
     25set -o pipefail
    2426
    2527#This script must be run as superuser
     
    103105
    104106echo '---> Copying mbr.bin'
    105 mbr=`find /usr/lib -name mbr.bin | head -1`
     107mbr=`find /usr -name mbr.bin | head -1`
     108if [[ -z ${mbr} ]]; then
     109        echo "Could not find mbr.bin!" >&2
     110        exit 2
     111fi
    106112cat $mbr >> $DRIVE
    107113
     
    120126
    121127echo '---> Making temporary directories'
    122 ISO_DIR=`mktemp -d iso-XXXXXXXX`
    123 USB_DIR=`mktemp -d usb-XXXXXXXX`
     128ISO_DIR=`mktemp -d iso-XXXXXXXX --tmpdir=/tmp`
     129USB_DIR=`mktemp -d usb-XXXXXXXX --tmpdir=/tmp`
    124130
    125131echo '---> Mounting image and partition to temporary directories'
  • bccd-ng/tags/bccd-3.1.1-rc/bin/build_livecd.pl

    r3486 r3763  
    8888
    8989if(defined($opts{'nocleanup'})) {
    90         print "Disabling automatic cleanup\n";
     90        print "Disabled automatic cleanup\n";
    9191        $ft = File::Temp->newdir("/tmp/$PROJECT.XXXXXXX",CLEANUP => 0);
    9292}
    9393else {
    94         print "Enabling automatic cleanup\n";
     94        print "Enabled automatic cleanup\n";
    9595        $ft = File::Temp->newdir("/tmp/$PROJECT.XXXXXXX",DIR=>$dir,CLEANUP => 1);
    9696}
     
    241241    "",
    242242    "Built initial install tree.",
    243     "debootstrap --arch $opts{'arch'} $opts{'suite'} $BUILDDIR $debmirror",
     243    "debootstrap --exclude=linux-image-2.6.32-5,linux-image-2.6.32-5-amd64,linux-image-2.6.32-5-i686 --include=linux-image-2.6.38bccd-01771-gc6b7697 --arch $opts{'arch'} $opts{'suite'} $BUILDDIR $debmirror",
    244244    );
    245245
     
    288288    );
    289289
    290 foreach my $file ( "$BUILDDIR/etc/apt/sources.list","$BUILDDIR/etc/apt/apt.conf","$BUILDDIR/etc/dhcp/dhcpd.conf","$BUILDDIR/etc/dhcp/dhclient.conf","$BUILDDIR/etc/ssh/ssh_config","$BUILDDIR/etc/ssh/sshd_config","$BUILDDIR/etc/profile","$BUILDDIR/etc/default/useradd","$BUILDDIR/etc/default/tftpd-hpa","$BUILDDIR/etc/rc.local" ) {
     290foreach my $file ( "$BUILDDIR/etc/apt/sources.list","$BUILDDIR/etc/apt/apt.conf","$BUILDDIR/etc/dhcp/dhcpd.conf","$BUILDDIR/etc/dhcp/dhclient.conf","$BUILDDIR/etc/ssh/ssh_config","$BUILDDIR/etc/ssh/sshd_config","$BUILDDIR/etc/profile","$BUILDDIR/etc/default/useradd","$BUILDDIR/etc/default/tftpd-hpa","$BUILDDIR/etc/rc.local","$BUILDDIR/etc/init.d/networking", ) {
    291291    if( -f $file ) {
    292292        $Bccd->run_test(
     
    374374# /etc fetch
    375375foreach my $file ( "hosts", "hosts.compute", "hosts.allow", "hosts.deny", "profile", "modules", "modules.net",
    376           "passwd.compute", "group.compute", "shadow.compute", "exports.compute",
    377           "nsswitch.conf", "unionfs.conf", "X11/xinit/xinitrc", "X11/xinit/xserverrc",
    378           "dpkg/dpkg.cfg", "ld.so.conf.d/software.conf", "sudoers", "init.d/bccd-networking",
    379                   "init.d/bccd-bootflags", "init.d/bccd-automated", "init.d/bccd-passwd",
     376                   "passwd.compute", "group.compute", "shadow.compute", "exports.compute",
     377                   "nsswitch.conf", "unionfs.conf", "X11/xinit/xinitrc", "X11/xinit/xserverrc",
     378                   "dpkg/dpkg.cfg", "ld.so.conf.d/software.conf", "sudoers", "init.d/bccd-networking",
     379                   "init.d/bccd-bootflags", "init.d/bccd-automated", "init.d/bccd-passwd",
    380380                   "init.d/bccd-dhcp", "init.d/bccd-sshd", "X11/xorg.conf",
    381           "lam.conf", "init.d/bccd-nfs", "init.d/bccd-unite-sw", "init.d/bccd-nics",
    382           "init.d/bccd-dhcp-conf", "init.d/bccd-route", "init.d/bccd-keyboard", "rc.local",
    383           "init.d/bccd-fsrw", "init.d/bccd-mail", "auto.master", "auto.sshfs", "ld.so.conf.d/CUDA.conf" ) {
     381                   "lam.conf", "init.d/bccd-nfs", "init.d/bccd-unite-sw", "init.d/bccd-nics",
     382                   "init.d/bccd-dhcp-conf", "init.d/bccd-route", "init.d/bccd-keyboard", "rc.local",
     383                   "init.d/bccd-fsrw", "init.d/bccd-mail", "auto.master", "auto.sshfs", "ld.so.conf.d/CUDA.conf",
     384                   "init.d/networking","init.d/nfs-common") {
    384385    $Bccd->run_test(
    385386        "revfetch",
     
    400401    );
    401402
    402 foreach my $file ( "bccd-networking", "bccd-passwd", "bccd-dhcp", "bccd-sshd", "bccd-nfs", "bccd-unite-sw",
    403           "bccd-nics", "bccd-dhcp-conf", "bccd-route", "bccd-keyboard", "bccd-fsrw", "bccd-mail", "bccd-bootflags", "bccd-automated" ) {
     403foreach my $file ( "bccd-networking", "bccd-passwd", "bccd-dhcp", "bccd-sshd", "bccd-nfs", "bccd-unite-sw", "networking",
     404          "bccd-nics", "bccd-dhcp-conf", "bccd-route", "bccd-keyboard", "bccd-fsrw", "bccd-mail", "bccd-bootflags", "bccd-automated", "nfs-common", ) {
    404405    $Bccd->run_test(
    405406        "chmod",
     
    434435    $svnrev,
    435436    "$websvn/trees/lib/",
     437    );
     438
     439$Bccd->run_test(
     440    "recrevfetch",
     441    "",
     442    "Fetched opt directory.",
     443    $svnrev,
     444    "$websvn/trees/opt/",
    436445    );
    437446
     
    590599}
    591600
    592 if($opts{'arch'} eq 'amd64') {
    593     $Bccd->run_test(
    594         "system",
    595         100,
    596         "Fetching tftpd-hpa separately.",
    597         "/usr/sbin/chroot $BUILDDIR /usr/bin/apt-get --force-yes -y install tftpd-hpa",
    598         );
    599 }
    600 elsif($opts{'arch'} eq 'i386') {
    601     $Bccd->run_test(
    602         "system",
    603         0,
    604         "Fetching tftpd-hpa separately.",
    605         "/usr/sbin/chroot $BUILDDIR /usr/bin/apt-get --force-yes -y install tftpd-hpa",
    606         );
    607 }
     601$Bccd->run_test(
     602        "system",
     603        0,
     604        "Fetching tftpd-hpa separately.",
     605        "/usr/sbin/chroot $BUILDDIR /usr/bin/apt-get --force-yes -y install tftpd-hpa",
     606        );
     607
     608$Bccd->run_test(
     609        "system",
     610        0,
     611        "Removed unneeded packages.",
     612        "/usr/sbin/chroot $BUILDDIR /usr/bin/apt-get -y remove @{$PACKAGES->{REMOVE}}",
     613        );
    608614
    609615$Bccd->run_test(
     
    722728        );
    723729}
     730# Mobeen: This section was added to solve the problem of missing std C++ library softlink.
     731# "Linked libstdc++.so.6.0.13 to libstdc++.so",
     732# "Linked /usr/lib32/libstdc++.so to  /usr/lib32/libstdc++.so.6",
     733if($opts{'arch'} eq 'amd64') {
     734        $Bccd->run_test(
     735                        "system",
     736                        "",
     737                        "Linked /usr/lib32/libstdc++.so.6.0.13 to /usr/lib32/libstdc++.so",
     738                        "/usr/sbin/chroot $BUILDDIR ln -s /usr/lib32/libstdc++.so.6 /usr/lib32/libstdc++.so",
     739                        );
     740}
     741elsif($opts{'arch'} eq 'i386') {
     742        $Bccd->run_test(
     743                        "system",
     744                        "",
     745                        "Linked /usr/lib/libstdc++.so.6.0.13 to /usr/lib/libstdc++.so",
     746                        "/usr/sbin/chroot $BUILDDIR ln -s /usr/lib/libstdc++.so.6 /usr/lib/libstdc++.so",
     747                        );
     748}
     749
    724750
    725751$Bccd->run_test(
     
    793819
    794820foreach my $script ("nis", "ssh-host-keys", "nfs-kernel-server", "ssh",
    795                     "isc-dhcp-server", "dbus", "hal", "apache2",
    796                     "module-init-tools",) {
     821                    "isc-dhcp-server", "dbus", "hal", "apache2","mpd",
     822                    "module-init-tools","networking","bccd-usage",) {
    797823    $Bccd->run_test(
    798824        "system",
     
    803829}
    804830
    805 foreach my $script ("nfs-common", "vboxadd", "vboxadd-service", "mpd",
    806                     "bccd-nvidia", "module-init-tools","bccd-mail") {
     831foreach my $script ("nfs-common", "vboxadd", "vboxadd-service",,"bccd-nics",
     832                    "bccd-nvidia", "module-init-tools","bccd-mail","networking",
     833                    "bccd-unite-sw","bccd-networking","mpd") {
    807834    $Bccd->run_test(
    808835        "system",
    809836        "",
    810         "Enabling $script at boot time.",
     837        "Enabled $script at boot time.",
    811838        "/usr/sbin/chroot $BUILDDIR /usr/sbin/update-rc.d $script defaults",
    812839        );
     
    864891    "system",
    865892    "",
    866     "Enabling bccd-nics config.",
    867     "/usr/sbin/chroot $BUILDDIR /usr/sbin/update-rc.d bccd-nics start 39 S .",
    868     );
    869 
    870 $Bccd->run_test(
    871     "system",
    872     "",
    873893    "Enabling bccd-dhcp-conf config.",
    874894    "/usr/sbin/chroot $BUILDDIR /usr/sbin/update-rc.d bccd-dhcp-conf start 38 S .",
     
    894914    "Enabling bccd-keyboard config.",
    895915    "/usr/sbin/chroot $BUILDDIR /usr/sbin/update-rc.d bccd-keyboard start 18 S .",
    896     );
    897 
    898 $Bccd->run_test(
    899     "system",
    900     "",
    901     "Enabling bccd-networking config.",
    902     "/usr/sbin/chroot $BUILDDIR /usr/sbin/update-rc.d bccd-networking start 42 2 S .",
    903     );
    904 
    905 $Bccd->run_test(
    906     "system",
    907     "",
    908     "Enabling networking config.",
    909     "/usr/sbin/chroot $BUILDDIR /usr/sbin/update-rc.d networking start 42 2 S .",
    910916    );
    911917
     
    10661072    "cd'd to $BUILDDIR",
    10671073    "$BUILDDIR",
    1068     );
    1069 
    1070 $Bccd->run_test(
    1071     "recrevfetch",
    1072     "",
    1073     "Fetched software tree.",
    1074     $svnrev,
    1075     "$websvn/trees/software/bccd/",
    10761074    );
    10771075
     
    13401338    );
    13411339
    1342 # Build CUDA
     1340# Build CUDA, link mpd.conf
    13431341if($opts{'arch'} eq 'i386') {
    13441342    $Bccd->run_test(
     
    13481346        "/usr/sbin/chroot $BUILDDIR sh /tmp/devdriver_3.2_linux_32_260.19.26.run --no-kernel-module -q -a -s",
    13491347        );
     1348        $Bccd->run_test(
     1349                "system",
     1350                0,
     1351                "Linking /etc/mpd.conf to i686 MPICH2 install",
     1352                "/usr/sbin/chroot $BUILDDIR ln -s /etc/mpd.conf /bccd/software/mpich2/1.4.1/Linux/BCCD/i686/etc/mpd.conf",
     1353                );
    13501354}
    13511355elsif($opts{'arch'} eq 'amd64') {
     
    13561360        "/usr/sbin/chroot $BUILDDIR sh /tmp/devdriver_3.2_linux_64_260.19.26.run --no-kernel-module -q -a -s",
    13571361        );
     1362        $Bccd->run_test(
     1363                "system",
     1364                0,
     1365                "Linking /etc/mpd.conf to x86_64 MPICH2 install",
     1366                "/usr/sbin/chroot $BUILDDIR ln -s /etc/mpd.conf /bccd/software/mpich2/1.4.1/Linux/BCCD/x86_64/etc/mpd.conf",
     1367                );
    13581368}
    13591369
     
    15981608    "",
    15991609    "Created compressed root filesystem.",
    1600     "mksquashfs build-bccd $tmpdir/KNOPPIX/KNOPPIX/KNOPPIX",
     1610    "mksquashfs build-bccd $tmpdir/KNOPPIX/KNOPPIX/KNOPPIX -comp xz",
    16011611    );
    16021612
  • bccd-ng/tags/bccd-3.1.1-rc/packages/etc/X11/xinit/xinitrc

    • Property svn:keywords set to Id
  • bccd-ng/tags/bccd-3.1.1-rc/packages/etc/X11/xinit/xserverrc

    • Property svn:keywords set to Id
  • bccd-ng/tags/bccd-3.1.1-rc/packages/etc/auto.sshfs

  • bccd-ng/tags/bccd-3.1.1-rc/packages/etc/exports.liberate

  • bccd-ng/tags/bccd-3.1.1-rc/packages/etc/init.d/networking

    • Property svn:keywords changed from Id Rev Author Date to Id
    r3456 r3763  
    1 #!/bin/bash -e
     1#!/bin/sh -e
    22
    33# $Id$
    44
    5 # This file is part of BCCD, an open-source live CD for computational science
    6 # education.
    7 #
    8 # Copyright (C) 2010 Andrew Fitz Gibbon, Paul Gray, Kevin Hunter, Dave Joiner,
    9 #   Sam Leeman-Munk, Tom Murphy, Charlie Peck, Skylar Thompson, & Aaron Weeden
    10 
    11 #
    12 # This program is free software: you can redistribute it and/or modify
    13 # it under the terms of the GNU General Public License as published by
    14 # the Free Software Foundation, either version 3 of the License, or
    15 # (at your option) any later version.
    16 #
    17 # This program is distributed in the hope that it will be useful,
    18 # but WITHOUT ANY WARRANTY; without even the implied warranty of
    19 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    20 # GNU General Public License for more details.
    21 #
    22 # You should have received a copy of the GNU General Public License
    23 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
    24 
    255### BEGIN INIT INFO
    266# Provides:          networking
    27 # Required-Start:    mountkernfs ifupdown $local_fs bccd-nics
    28 # Required-Stop:     ifupdown $local_fs
    29 # Default-Start:     2 3 4 5
     7# Required-Start:    mountkernfs $local_fs bccd-nics
     8# Required-Stop:     $local_fs
     9# Should-Start:      ifupdown
     10# Should-Stop:       ifupdown
     11# Default-Start:     2 5
    3012# Default-Stop:      0 1 6
    3113# Short-Description: Raise network interfaces.
     
    3820. /lib/lsb/init-functions
    3921
    40 spoofprotect_rp_filter() {
    41     [ -e /proc/sys/net/ipv4/conf/all/rp_filter ] || return 1
    42     RC=0
    43     for f in /proc/sys/net/ipv4/conf/*/rp_filter; do
    44         echo 1 > $f || RC=1
    45     done
    46     return $RC
     22process_options() {
     23    [ -e /etc/network/options ] || return 0
     24    log_warning_msg "/etc/network/options still exists and it will be IGNORED! Read README.Debian of netbase."
    4725}
    4826
    49 spoofprotect() {
    50     log_action_begin_msg "Setting up IP spoofing protection"
    51     if spoofprotect_rp_filter; then
    52         log_action_end_msg 0 "rp_filter"
    53     else
    54         log_action_end_msg 1
     27check_network_file_systems() {
     28    [ -e /proc/mounts ] || return 0
     29
     30    if [ -e /etc/iscsi/iscsi.initramfs ]; then
     31        log_warning_msg "not deconfiguring network interfaces: iSCSI root is mounted."
     32        exit 0
    5533    fi
     34
     35    exec 9<&0 < /proc/mounts
     36    while read DEV MTPT FSTYPE REST; do
     37        case $DEV in
     38        /dev/nbd*|/dev/nd[a-z]*|/dev/etherd/e*)
     39            log_warning_msg "not deconfiguring network interfaces: network devices still mounted."
     40            exit 0
     41            ;;
     42        esac
     43        case $FSTYPE in
     44        nfs|nfs4|smbfs|ncp|ncpfs|cifs|coda|ocfs2|gfs|pvfs|pvfs2|fuse.httpfs|fuse.curlftpfs)
     45            log_warning_msg "not deconfiguring network interfaces: network file systems still mounted."
     46            exit 0
     47            ;;
     48        esac
     49    done
     50    exec 0<&9 9<&-
    5651}
    5752
    58 ip_forward() {
    59     log_action_begin_msg "Enabling packet forwarding"
    60     if echo 1 > /proc/sys/net/ipv4/ip_forward; then
    61         log_action_end_msg 0
    62     else
    63         log_action_end_msg 1
    64     fi
    65 }
     53check_network_swap() {
     54    [ -e /proc/swaps ] || return 0
    6655
    67 syncookies() {
    68     log_action_begin_msg "Enabling TCP SYN cookies"
    69     if echo 1 > /proc/sys/net/ipv4/tcp_syncookies; then
    70         log_action_end_msg 0
    71     else
    72         log_action_end_msg 1
    73     fi
    74 }
    75 
    76 doopt() {
    77     optname=$1
    78     default=$2
    79     opt=`grep "^$optname=" /etc/network/options || true`
    80     if [ -z "$opt" ]; then
    81         opt="$optname=$default"
    82     fi
    83     optval=${opt#$optname=}
    84     if [ "$optval" = "yes" ]; then
    85         eval $optname
    86     fi
    87 }
    88 
    89 process_options() {
    90     [ -e /etc/network/options ] || return 0
    91     log_warning_msg "/etc/network/options is deprecated (see README.Debian of netbase)."
    92     doopt spoofprotect yes
    93     doopt syncookies no
    94     doopt ip_forward no
     56    exec 9<&0 < /proc/swaps
     57    while read DEV MTPT FSTYPE REST; do
     58        case $DEV in
     59        /dev/nbd*|/dev/nd[a-z]*|/dev/etherd/e*)
     60            log_warning_msg "not deconfiguring network interfaces: network swap still mounted."
     61            exit 0
     62            ;;
     63        esac
     64    done
     65    exec 0<&9 9<&-
    9566}
    9667
     
    9869start)
    9970        process_options
     71
    10072        log_action_begin_msg "Configuring network interfaces"
    101         if ifup -a; then
     73        if ifup --force -a; then
    10274            log_action_end_msg $?
    10375        else
    10476            log_action_end_msg $?
    10577        fi
    106         #nics=`ifconfig | grep ^eth | wc -l`
    107         #let "hostnic = $nics - 1"
    108         #echo "hostnic is ${hostnic}" > /root/hostnic
    109 
    11078        ;;
    11179
    11280stop)
    113         if sed -n 's/^[^ ]* \([^ ]*\) \([^ ]*\) .*$/\2/p' /proc/mounts |
    114                 grep -qE '^(nfs[1234]?|smbfs|ncp|ncpfs|coda|cifs)$'; then
    115             log_warning_msg "not deconfiguring network interfaces: network shares still mounted."
    116             exit 0
    117         fi
     81        check_network_file_systems
     82        check_network_swap
    11883
    11984        log_action_begin_msg "Deconfiguring network interfaces"
     
    12792force-reload|restart)
    12893        process_options
     94
     95        log_warning_msg "Running $0 $1 is deprecated because it may not enable again some interfaces"
    12996        log_action_begin_msg "Reconfiguring network interfaces"
    13097        ifdown -a --exclude=lo || true
     
    137104
    138105*)
    139         echo "Usage: /etc/init.d/networking {start|stop|restart|force-reload}"
     106        echo "Usage: /etc/init.d/networking {start|stop}"
    140107        exit 1
    141108        ;;
  • bccd-ng/tags/bccd-3.1.1-rc/packages/etc/skel/.bash_profile

    r3111 r3763  
    4949
    5050. /usr/local/Modules/3.2.6/init/bash
    51 #module load modules/remote-bccd
    5251module load modules
    53 module load cuda dreamm fftw openmpi mcell
     52module load intelcc cuda fftw openmpi
    5453
    5554# Alias some MPI commands to get X-forwarding working properly.
  • bccd-ng/tags/bccd-3.1.1-rc/packages/packages.conf

    r3478 r3763  
    109109   - mingetty
    110110   - x11vnc
    111    - sun-java6-plugin
     111   - icedtea6-plugin
    112112EXTRA :
    113113    - fftw2
     
    162162    - xserver-xorg-input-kbd
    163163    - xserver-xorg-input-mouse
     164    - mtools
     165    - libnuma
    164166AMD64 :
    165167    - libc6-dev-i386
     
    169171    - nvidia-glx-ia32
    170172    - gfortran-4.3-multilib
     173REMOVE :
     174    - avahi-daemon
     175    - cups
  • bccd-ng/tags/bccd-3.1.1-rc/trees/arch/i386/bccd

  • bccd-ng/tags/bccd-3.1.1-rc/trees/bin/bccd-nic-setup

  • bccd-ng/tags/bccd-3.1.1-rc/trees/bin/bccd-reset-network

    r3398 r3763  
    2424
    2525LOGCMD="logger -t $(basename $0)"
     26NATSH=/etc/network/if-up.d/nat
    2627
    2728# Print an optional message and die
     
    5253if [ ${RC} -ne 0 ]; then
    5354        fatal -m "Unconfiguring network failed" -r ${RC}
     55fi
     56
     57if [[ -f ${NATSH} ]]; then
     58    ${LOGCMD} -p info "Removing NAT rules"
     59    /bin/rm -f ${NATSH}
    5460fi
    5561
     
    95101        fatal -m "DHCP server start failed" -r ${RC}
    96102fi
     103
     104# Workaround for possible Debian/iptables bug (#684)
     105# Only start NAT if script exists; it will only be
     106# created in the event that there is a default gateway
     107${LOGCMD} -p info "Make sure NAT starts"
     108if ! /sbin/iptables -n -t nat -L|grep -q ^SNAT && \
     109        [[ -x ${NATSH} ]] ; then
     110        ${NATSH}
     111        RC=$?
     112        if [ ${RC} -ne 0 ]; then
     113                fatal -m "NAT start failed" -r ${RC}
     114        fi
     115fi
     116
     117# tftpd-hpa won't be started on boot if no networking is setup (#687)
     118${LOGCMD} -p info "Starting TFTP server"
     119/usr/sbin/invoke-rc.d tftpd-hpa start
     120RC=$?
     121if [ ${RC} -ne 0 ]; then
     122        fatal -m "TFTP server start failed" -r ${RC}
     123fi
  • bccd-ng/tags/bccd-3.1.1-rc/trees/diskless

  • bccd-ng/tags/bccd-3.1.1-rc/trees/etc/bash.bashrc

    r3111 r3763  
    88. /usr/local/Modules/3.2.6/init/bash
    99module load modules
    10 module load cuda dreamm fftw openmpi mcell
     10module load cuda intelcc openmpi
    1111
    1212# If not running interactively, don't do anything
  • bccd-ng/tags/bccd-3.1.1-rc/trees/etc/init.d/bccd-nvidia

  • bccd-ng/tags/bccd-3.1.1-rc/trees/etc/init.d/bccd-usage

    r2807 r3763  
    2525### BEGIN INIT INFO
    2626# Provides:          bccd-usage
    27 # Required-Start:
     27# Required-Start:    $all
    2828# Required-Stop:
    29 # Default-Start:     S
     29# Default-Start:     2 5
    3030# Default-Stop:
    3131# Short-Description: Writes /etc/issue with current version numbers.
    3232### END INIT INFO
     33
     34#set -x
     35
     36#trap "echo exit sleeping; sleep 30" EXIT
     37
     38#echo "In usage, sleeping..."
     39
     40#sleep 10
    3341
    3442# Check if we can actually get to the internet
     
    3947
    4048# Only ask for data on headnode, live mode
    41 if [ "$(hostname -s)" != "node000" ]; then
     49if [ "$(hostname -s)" != "node000" ] ||
     50        ! grep LIVE /etc/bccd-stage; then
    4251        exit
    4352fi
  • bccd-ng/tags/bccd-3.1.1-rc/trees/etc/init.d/mpd

    r3395 r3763  
    2525### BEGIN INIT INFO
    2626# Provides:             mpd
    27 # Required-Start:
     27# Required-Start:       networking snmpd
    2828# Required-Stop:
    29 # Default-Start:        2 4 5
     29# Default-Start:        2 3 4 5
    3030# Default-Stop:         0 1 6
    3131# Short-Description: Start MPICH Process Daemon
     
    4040. /lib/lsb/init-functions
    4141
     42. /usr/local/Modules/3.2.6/init/bash
     43module load modules
     44module load intelcc mpich2
     45
    4246NAME=mpd
    43 MPICH_BIN=/bccd/software/mpich2/bin
    44 DAEMON=$MPICH_BIN/$NAME
    45 MPDEXIT="$MPICH_BIN/mpdexit localmpd"
     47DAEMON=$(which mpd)
     48MPDEXIT=$(which mpdexit)
    4649PIDFILE=/var/run/mpd.pid
    4750CFGFILE=/etc/mpd.conf
    4851PORTFILE=/etc/snmp/mpd.port
    49 NCPUS=`grep ^processor /proc/cpuinfo | wc -l`
     52NCPUS=$(grep ^processor /proc/cpuinfo | wc -l)
    5053
    5154HEADNODE=node000.bccd.net
     
    5861        # if we've already found a port, don't try again
    5962        # but check it anyways just for good measure
    60         if test -f $PORTFILE; then
    61                 PORT=`cat $PORTFILE`
    62                 /bin/nc -z localhost $PORT
     63        if [[ -f ${PORTFILE} ]]; then
     64                PORT=$(cat ${PORTFILE})
     65                /bin/nc -z localhost ${PORT}
    6366                # unset PORT if it's now used
    64                 test $? -eq 0 && unset PORT
     67                if [[ $? -eq 0 ]]; then
     68                        unset PORT
     69                fi
    6570        fi
    6671
    67         if ! test $PORT; then
     72        if [[ -z ${PORT} || ! -f ${PORTFILE} ]]; then
    6873                # $RANDOM gives an integer between 0 and 32767
    6974                # ... add 32767 to get a high port number.
     
    7479                /bin/nc -z localhost $PORT
    7580                while [ $? -eq 0 ]; do
    76                         PORT=$(($RANDOM+32767))
    77                         /bin/nc -z localhost $PORT
     81                        PORT=$((${RANDOM}+32767))
     82                        /bin/nc -z localhost ${PORT}
    7883                done
    7984
    80                 echo $PORT > $PORTFILE
     85                echo ${PORT} > ${PORTFILE}
    8186        fi
    8287
    83         chmod 600 $CFGFILE
     88        chmod 600 ${CFGFILE}
    8489        start-stop-daemon --start --quiet --oknodo \
    85                 --pidfile $PIDFILE --startas $DAEMON -- \
    86                 --pid=$PIDFILE --daemon --ncpus=$NCPUS --listenport=$PORT
     90                --pidfile ${PIDFILE} --startas ${DAEMON} -- \
     91                --pid=${PIDFILE} --daemon --ncpus=${NCPUS} --listenport=${PORT}
    8792        status=$?
    88         chmod 644 $CFGFILE
     93        chmod 644 ${CFGFILE}
    8994
    90         return $status
     95        return ${status}
    9196}
    9297
    9398function compute_start {
    94         PORT=`snmpget -OQv -c public -v 1 $HEADNODE \
     99        PORT=$(snmpget -OQv -c public -v 1 ${HEADNODE} \
    95100                .1.3.6.1.4.1.2021.84.4.1.2.8.109.112.100.95.112.111.114.116.1 \
    96                 | sed -e 's!"!!g'`
     101                | sed -e 's!"!!g')
    97102
    98         chmod 600 $CFGFILE
     103        chmod 600 ${CFGFILE}
    99104        start-stop-daemon --start --quiet --oknodo \
    100                 --pidfile $PIDFILE --startas $DAEMON -- \
    101                 --pid=$PIDFILE --daemon --ncpus=$NCPUS --host=$HEADNODE --port=$PORT
     105                --pidfile ${PIDFILE} --startas ${DAEMON} -- \
     106                --pid=${PIDFILE} --daemon --ncpus=${NCPUS} --host=${HEADNODE} --port=${PORT}
    102107        status=$?
    103         chmod 644 $CFGFILE
     108        chmod 644 ${CFGFILE}
    104109
    105         return $status
     110        return ${status}
    106111}
    107112
    108113function start_mpd {
    109114        # matches node000.bccd.net AND pxenode000.bccd.net
    110         if [[ "`hostname`" =~ node000 ]]; then
     115        if [[ "$(hostname)" =~ node000 ]]; then
    111116                head_start
    112117                return $?
     
    119124case $1 in
    120125        start)
    121                 test $UID == 0 || { log_failure_msg "Must be root!" && exit 4; }
     126                test ${UID} == 0 || { log_failure_msg "Must be root!" && exit 4; }
    122127
    123128                $0 status &> /dev/null
     
    129134
    130135                log_progress_msg "mpd"
    131                 log_end_msg $status
     136                log_end_msg ${status}
    132137                ;;
    133138        stop)
    134                 test $UID == 0 || { log_failure_msg "Must be root!" && exit 4; }
     139                if [[ ${UID} -ne 0 ]]; then
     140                        log_failure_msg "Must be root!"
     141                        exit 4
     142                fi
    135143
    136144                $0 status &> /dev/null
     
    138146
    139147                log_daemon_msg "Stopping MPD server"
    140                 chmod 600 $CFGFILE
    141                 $MPDEXIT
     148                chmod 600 ${CFGFILE}
     149                ${MPDEXIT}
    142150                status=$?
    143                 chmod 644 $CFGFILE
     151                chmod 644 ${CFGFILE}
    144152
    145153                log_progress_msg "mpd"
    146154               
    147                 rm -f $PIDFILE &> /dev/null
    148                 log_end_msg $status
     155                rm -f ${PIDFILE} &> /dev/null
     156                log_end_msg ${status}
    149157                ;;
    150158        restart | force-reload)
     
    152160                ;;
    153161        status)
    154                 pidofproc -p $PIDFILE $DAEMON &> /dev/null
     162                pidofproc -p ${PIDFILE} ${DAEMON} &> /dev/null
    155163                status=$?
    156                 if [ $status -eq 0 ]; then
     164                if [ ${status} -eq 0 ]; then
    157165                        log_success_msg "MPD server is running."
    158166                else
    159167                        log_failure_msg "MPD server is not running."
    160168                fi
    161                 exit $status
     169                exit ${status}
    162170                ;;
    163171        *)
  • bccd-ng/tags/bccd-3.1.1-rc/trees/etc/initramfs-tools.diskless/conf.d/resume

    • Property svn:keywords set to Id
    r2529 r3763  
     1# $Id$
     2
    13RESUME=/dev/mapper/space-swap
  • bccd-ng/tags/bccd-3.1.1-rc/trees/etc/initramfs-tools.diskless/initramfs.conf

    • Property svn:keywords set to Id
    r2531 r3763  
     1# $Id$
    12#
    23# initramfs.conf
  • bccd-ng/tags/bccd-3.1.1-rc/trees/etc/initramfs-tools.diskless/modules

    • Property svn:keywords set to Id
    r2529 r3763  
     1# $Id$
     2#
    13# List of modules that you want to include in your initramfs.
    24#
  • bccd-ng/tags/bccd-3.1.1-rc/trees/etc/initramfs-tools.diskless/scripts/init-bottom/aufs

    • Property svn:keywords set to Id
    r3398 r3763  
    11#!/bin/sh
     2
     3# $Id$
    24
    35PREREQ=""
  • bccd-ng/tags/bccd-3.1.1-rc/trees/etc/initramfs-tools.diskless/scripts/init-top/proc

    • Property svn:keywords set to Id
    r2545 r3763  
    11#!/bin/sh
     2
     3# $Id$
    24
    35mkdir /proc
  • bccd-ng/tags/bccd-3.1.1-rc/trees/etc/initramfs-tools.diskless/scripts/nfs-bottom/aufs

    • Property svn:keywords set to Id
    r2546 r3763  
    11#!/bin/sh
     2
     3# $Id$
    24
    35PREREQ=""
     
    2022. /${rootmnt}/etc/unionfs.conf
    2123. /tmp/net-${DEVICE}.conf
     24
     25# projectdir is the NFS dir for the read-only branch shared by all diskless nodes
    2226projectdir=${rootmnt}/${PROJECTDIR}
     27
     28# This is my read-write branch on NFS
    2329clientdir=${rootmnt}/${CLIENTDIR}/${IPV4ADDR}/
     30
     31# Local equivalkents
    2432localprojectdir=/project
    2533localclientdir=/client
     
    2836nfsmount -o rw ${ROOTSERVER}:${CLIENTDIR} ${localclientdir}
    2937
     38# Mount over the top of the last client mount
    3039mkdir -p ${localclientdir}/${IPV4ADDR}
    3140umount ${localclientdir}
    3241nfsmount -o rw ${ROOTSERVER}:${CLIENTDIR}/${IPV4ADDR} ${localclientdir}
     42
     43# Old cruft can cause PXE nodes to crash
     44echo "Clean up client directory"
     45/bin/busybox rm -fr ${localclientdir}/*
    3346
    3447echo "projectdir=${projectdir}" >> /conf/aufs.conf
  • bccd-ng/tags/bccd-3.1.1-rc/trees/etc/initramfs-tools.diskless/update-initramfs.conf

    • Property svn:keywords set to Id
    r2529 r3763  
     1# $Id$
    12#
    23# Configuration file for update-initramfs(8)
  • bccd-ng/tags/bccd-3.1.1-rc/trees/etc/mpd.conf

    • Property svn:keywords set to Id
  • bccd-ng/tags/bccd-3.1.1-rc/trees/software/bccd

    • Property svn:mergeinfo
      •  

        old new  
         1/bccd-ng/branches/skylar/bccd-3.1.1/trees/software/bccd:3682,3684,3686,3688,3742-3744
         2/bccd-ng/trunk/trees/software/bccd:3499-3762
  • bccd-ng/tags/bccd-3.1.1-rc/trees/usr/local/Modules/3.2.6/modulefiles/modules/.modulerc

    • Property svn:keywords set to Id
  • bccd-ng/tags/bccd-3.1.1-rc/trees/usr/local/Modules/3.2.6/modulefiles/modules/local

    • Property svn:keywords set to Id
    r2749 r3763  
    2525prepend-path    PATH            $modroot/bin
    2626prepend-path    MANPATH         $modroot/share/man
    27 setenv          BCCD_SW         /bccd/software
    2827append-path     MODULEPATH      /usr/local/etc/modules
    2928module          use             /usr/local/Modules/versions
     29set          MODULES_MACH [uname machine]
     30set          MODULES_OS [uname sysname]
     31set          MODULES_REL        BCCD
     32setenv       ARCHPATH $MODULES_OS/$MODULES_REL/$MODULES_MACH
     33setenv          BCCD_SW         /bccd/software
  • bccd-ng/tags/bccd-3.1.1-rc/trees/usr/local/Modules/3.2.6/modulefiles/modules/remote-bccd

    • Property svn:keywords changed from Id Rev Author Date to Id
    r2749 r3763  
    4646prepend-path    MANPATH         $modroot/share/man
    4747setenv          BCCD_SW         /bccd/software
    48 setenv          BCCD_SW_REMOTE  /mnt/ssh/software
    4948append-path     MODULEPATH      /usr/local/etc/modules-remote
    5049module          use             /usr/local/Modules/versions
     50set          MODULES_MACH [uname machine]
     51set          MODULES_OS [uname sysname]
     52set          MODULES_REL        BCCD
     53setenv       ARCHPATH $MODULES_OS/$MODULES_REL/$MODULES_MACH
     54setenv          BCCD_SW_REMOTE  /mnt/ssh/software
  • bccd-ng/tags/bccd-3.1.1-rc/trees/usr/local/etc/modules-remote/cuda/3.2.16

  • bccd-ng/tags/bccd-3.1.1-rc/trees/usr/local/etc/modules-remote/gromacs/3.3.3_openmpi

  • bccd-ng/tags/bccd-3.1.1-rc/trees/usr/local/etc/modules-remote/openmpi/1.4.4

  • bccd-ng/tags/bccd-3.1.1-rc/trees/usr/local/etc/modules/R/2.6.2

    r2749 r3763  
    2727set             MOD_R              $env(BCCD_SW)/R
    2828set      MOD_R_VERSION      2.6.2
    29 set      MOD_R_DIR          $MOD_R-$MOD_R_VERSION
     29set      MOD_R_DIR          $MOD_R/$MOD_R_VERSION/$env(ARCHPATH)
    3030module-whatis "R"
    3131
  • bccd-ng/tags/bccd-3.1.1-rc/trees/usr/local/etc/modules/c3/4.0.1

    • Property svn:keywords changed from Id Rev Author Date to Id
    r2749 r3763  
    2626set             MOD_C3              $env(BCCD_SW)/c3
    2727set             MOD_C3_VERSION      4.0.1
    28 set             MOD_C3_DIR          $MOD_C3-$MOD_C3_VERSION
     28set             MOD_C3_DIR          $MOD_C3/$MOD_C3_VERSION/$env($ARCHPATH)
    2929module-whatis   "C3"
    3030
  • bccd-ng/tags/bccd-3.1.1-rc/trees/usr/local/etc/modules/cuda/3.2.16

    • Property svn:keywords changed from Id Rev Author Date to Id
    r3050 r3763  
    2626set             MOD_CUDA              $env(BCCD_SW)/cuda
    2727set      MOD_CUDA_VERSION      3.2.16
    28 set      MOD_CUDA_DIR          $MOD_CUDA-$MOD_CUDA_VERSION
     28set      MOD_CUDA_DIR          $MOD_CUDA/$MOD_CUDA_VERSION/$env(ARCHPATH)
    2929set      MOD_CUDASDK_DIR          $MOD_CUDA_DIR/sdk
    3030module-whatis "CUDA"
     
    3232prepend-path    PATH                $MOD_CUDA_DIR/bin/
    3333prepend-path    LD_LIBRARY_PATH     $MOD_CUDA_DIR/lib/
     34prepend-path    LD_LIBRARY_PATH     $MOD_CUDA_DIR/lib64/
    3435prepend-path    MANPATH             $MOD_CUDA_DIR/man/
    3536prepend-path    PATH                $MOD_CUDASDK_DIR/bin/linux/release/
  • bccd-ng/tags/bccd-3.1.1-rc/trees/usr/local/etc/modules/dreamm/4.1.6

    • Property svn:keywords changed from Id Rev Author Date to Id
    r2749 r3763  
    2626set             MOD_DREAMM              $env(BCCD_SW)/dreamm
    2727set      MOD_DREAMM_VERSION      4.1.6
    28 set      MOD_DREAMM_DIR          $MOD_DREAMM-$MOD_DREAMM_VERSION
     28set      MOD_DREAMM_DIR          $MOD_DREAMM/$MOD_DREAMM_VERSION/$env(ARCHPATH)
    2929module-whatis "DREAMM"
    3030
  • bccd-ng/tags/bccd-3.1.1-rc/trees/usr/local/etc/modules/fftw/3.1.2

    r2749 r3763  
    2626set             MOD_FFTW              $env(BCCD_SW)/fftw
    2727set      MOD_FFTW_VERSION      3.1.2
    28 set      MOD_FFTW_DIR          $MOD_FFTW-$MOD_FFTW_VERSION
     28set      MOD_FFTW_DIR          $MOD_FFTW/$MOD_FFTW_VERSION/$env(ARCHPATH)
    2929module-whatis "FFTW"
    3030
  • bccd-ng/tags/bccd-3.1.1-rc/trees/usr/local/etc/modules/intelcc/11.1.073

    • Property svn:keywords changed from Id Rev Author Date to Id
    r2805 r3763  
    2626set             MOD_INTELCC              $env(BCCD_SW)/intelcc
    2727set      MOD_INTELCC_VERSION      11.1.073
    28 set      MOD_INTELCC_DIR          $MOD_INTELCC-$MOD_INTELCC_VERSION
     28set      MOD_INTELCC_DIR          $MOD_INTELCC/$MOD_INTELCC_VERSION/$env(ARCHPATH)/
    2929module-whatis "INTELCC"
    3030
    31 prepend-path    PATH                $MOD_INTELCC_DIR/bin/ia32
    32 prepend-path    LD_LIBRARY_PATH     $MOD_INTELCC_DIR/lib/ia32
     31if { [uname machine]=="x86_64" } {
     32        set SUFFIX "intel64"
     33} else {
     34        set SUFFIX "ia32"
     35}
     36prepend-path    PATH                $MOD_INTELCC_DIR/bin/$SUFFIX
     37prepend-path    LD_LIBRARY_PATH     $MOD_INTELCC_DIR/lib/$SUFFIX
    3338prepend-path    MANPATH             $MOD_INTELCC_DIR/man/
    34 prepend-path    -d " " LDFLAGS             -L$MOD_INTELCC_DIR/lib/ia32
     39prepend-path    -d " " LDFLAGS             -L$MOD_INTELCC_DIR/lib/$SUFFIX
    3540prepend-path    -d " " CPPFLAGS            -I$MOD_INTELCC_DIR/include/
  • bccd-ng/tags/bccd-3.1.1-rc/trees/usr/local/etc/modules/mcell/3.1

    • Property svn:keywords changed from Id Rev Author Date to Id
    r2749 r3763  
    2626set             MOD_MCELL              $env(BCCD_SW)/mcell
    2727set      MOD_MCELL_VERSION      3.1
    28 set      MOD_MCELL_DIR          $MOD_MCELL-$MOD_MCELL_VERSION
     28set      MOD_MCELL_DIR          $MOD_MCELL/$MOD_MCELL_VERSION/$env(ARCHPATH)
    2929module-whatis "MCELL"
    3030
  • bccd-ng/tags/bccd-3.1.1-rc/trees/usr/local/etc/modules/mpiblast/1.5.0-pio

    • Property svn:keywords changed from Id Rev Author Date to Id
    r2749 r3763  
    2626set             MOD_MPIBLAST              $env(BCCD_SW)/mpiblast
    2727set      MOD_MPIBLAST_VERSION      1.5.0-pio
    28 set      MOD_MPIBLAST_DIR          $MOD_MPIBLAST-$MOD_MPIBLAST_VERSION
     28set      MOD_MPIBLAST_DIR          $MOD_MPIBLAST/$MOD_MPIBLAST_VERSION/$env(ARCHPATH)
    2929module-whatis "MPIBLAST"
    3030
  • bccd-ng/tags/bccd-3.1.1-rc/trees/usr/local/etc/modules/mpich2/1.4.1

    • Property svn:keywords changed from Id Rev Author Date to Id
    r3437 r3763  
    2828set             MOD_MPICH2              $env(BCCD_SW)/mpich2
    2929set      MOD_MPICH2_VERSION      1.4.1
    30 set      MOD_MPICH2_DIR          $MOD_MPICH2-$MOD_MPICH2_VERSION
     30set      MOD_MPICH2_DIR          $MOD_MPICH2/$MOD_MPICH2_VERSION/$env(ARCHPATH)
    3131module-whatis "MPICH2"
    3232
  • bccd-ng/tags/bccd-3.1.1-rc/trees/usr/local/etc/modules/openmpi/1.4.4

    r3437 r3763  
    2828set             MOD_OPENMPI              $env(BCCD_SW)/openmpi
    2929set      MOD_OPENMPI_VERSION      1.4.4
    30 set      MOD_OPENMPI_DIR          $MOD_OPENMPI-$MOD_OPENMPI_VERSION
     30set      MOD_OPENMPI_DIR          $MOD_OPENMPI/$MOD_OPENMPI_VERSION/$env(ARCHPATH)
    3131module-whatis "OPENMPI"
    3232
  • bccd-ng/tags/bccd-3.1.1-rc/trees/usr/local/etc/modules/papi/3.7.2

    r2749 r3763  
    2626set             MOD_PAPI              $env(BCCD_SW)/papi
    2727set      MOD_PAPI_VERSION      3.7.2
    28 set      MOD_PAPI_DIR          $MOD_PAPI-$MOD_PAPI_VERSION
     28set      MOD_PAPI_DIR          $MOD_PAPI/$MOD_PAPI_VERSION/$env(ARCHPATH)
    2929module-whatis "PAPI"
    3030
  • bccd-ng/tags/bccd-3.1.1-rc/trees/usr/local/etc/modules/torque/2.5.1

    • Property svn:keywords changed from Id Rev Author Date to Id
    r2749 r3763  
    2626set             MOD_TORQUE              $env(BCCD_SW)/torque
    2727set      MOD_TORQUE_VERSION      2.5.1
    28 set      MOD_TORQUE_DIR          $MOD_TORQUE-$MOD_TORQUE_VERSION
     28set      MOD_TORQUE_DIR          $MOD_TORQUE/$MOD_TORQUE_VERSION/$env(ARCHPATH)
    2929module-whatis "TORQUE"
    3030
  • bccd-ng/tags/bccd-3.1.1-rc/trees/usr/local/lib/site_perl/Bccd.pm

    r3474 r3763  
    22082208        print $NAT qq{#!/bin/bash\n\n};
    22092209 
     2210        print $NAT qq{if hostname|grep -q node000; then\n};
     2211
    22102212        foreach my $LINE (
    22112213            q{--flush},
     
    22182220            print $NAT qq{\t/sbin/iptables $LINE\n};
    22192221        }
     2222        print $NAT "fi\n";
    22202223       
    22212224        close($NAT);
     
    22452248    my($temp,$bccd_nic,$gotpxe,$dhcp_source,$sub,$rc);
    22462249    $sub = 'config_nic_dialog';
    2247    
    2248     $gotpxe = 0;
    2249    
     2250
     2251    # Find NICs with external connectivity
    22502252  FIND_EXT_NIC:
    22512253    {
     
    22582260            }
    22592261        }
     2262
     2263        # Display NICs that have non-BCCD IP addresses with the IP address they got
    22602264        foreach my $nic (sort(keys(%{$nic_conf}))) {
    22612265            # Only if we didn't pick up a BCCD server
     
    22652269            }
    22662270        }
     2271
     2272        # If only one NIC is present, choose it for the BCCD network without prompting
    22672273        if($#dhcp_nics == 1) {
    22682274            $bccd_nic = $dhcp_nics[0];
     
    23442350              FIND_CUR_NIC:
    23452351                do {
    2346                     if (-e '/testmode'){
    2347                         $nic_conf->{$nic}->{'ipaddr'} = '192.168.0.*';
    2348                     }else{
    2349                         $nic_conf->{$nic}->{'ipaddr'} =
    2350                             ($temp = $d->inputbox(text=>
    2351                                                   "$nic IP address (mandatory)")) ? $temp : undef;
    2352                        
    2353                         # Repeat on typos
    2354                         if(!$self->is_dialog_ok($d)) {
    2355                             redo FIND_EXT_NIC;
    2356                         }
    2357                         elsif($nic_conf->{$nic}->{'ipaddr'}
    2358                               eq $BCCD_NET->{'ipaddr'}) {
    2359                             $d->msgbox(text =>
    2360                                        "IP address cannot be the BCCD virtual IP ($BCCD_NET->{'ipaddr'}).");
    2361                             goto FIND_CUR_NIC;
    2362                         }
    2363                     }
    2364                    
    2365                     if(!$self->is_dialog_ok($d)) {
    2366                         redo FIND_EXT_NIC;
    2367                     }
    2368                    
    2369                     $nic_conf->{$nic}->{'gw'} = ($temp = $d->inputbox(text=>"$nic Gateway (optional)")) ? $temp : undef;
    2370 
    23712352                    # Setup a PXE network if liberated and requested
    2372                     if(!$gotpxe && $self->get_stage() eq 'LIBERATED' && $d->yesno(text=>"Make $nic the PXE-capable NIC?")) {
     2353                    if(!defined($gotpxe) && $self->get_stage() eq 'LIBERATED' && $d->yesno(text=>"Make $nic the PXE-capable NIC?")) {
    23732354                        $gotpxe = 1;
    23742355                        $nic_conf->{$nic}->{'pxenic'}  = $nic;
     
    23852366                        }
    23862367                    }
    2387                     else {
    2388                         $nic_conf->{$nic}->{'ipaddr'} = ($temp = $d->inputbox(text=>"$nic IP address (mandatory)")) ? $temp : undef;
    2389                         if(defined($nic_conf->{$nic}->{'ipaddr'}) &&
    2390                            $nic_conf->{$nic}->{'ipaddr'} eq $BCCD_NET->{'ipaddr'}) {
    2391                             $d->msgbox(text => "IP address cannot be the BCCD virtual IP ($BCCD_NET->{'ipaddr'}).");
    2392                             goto FIND_CUR_NIC;
     2368                    else{
     2369                        # If no PXE, then allow the user to set network information manually
     2370                        if (-e '/testmode'){
     2371                            $nic_conf->{$nic}->{'ipaddr'} = '192.168.0.*';
     2372                        }else{
     2373                            $nic_conf->{$nic}->{'ipaddr'} =
     2374                                ($temp = $d->inputbox(text=>
     2375                                                      "$nic IP address (mandatory)")) ? $temp : undef;
     2376                           
     2377                            # Repeat on typos
     2378                            if(!$self->is_dialog_ok($d)) {
     2379                                redo FIND_EXT_NIC;
     2380                            }
     2381                            elsif($nic_conf->{$nic}->{'ipaddr'}
     2382                                  eq $BCCD_NET->{'ipaddr'}) {
     2383                                $d->msgbox(text =>
     2384                                           "IP address cannot be the BCCD virtual IP ($BCCD_NET->{'ipaddr'}).");
     2385                                goto FIND_CUR_NIC;
     2386                            }
    23932387                        }
    23942388                       
    2395                         $nic_conf->{$nic}->{'mask'} = ($temp = $d->inputbox(text=>"$nic Subnet mask (mandatory)")) ? $temp : undef;
     2389                        if (-e '/testmode'){
     2390                            $nic_conf->{$nic}->{'mask'} = "255.255.255.0";
     2391                        } else {
     2392                            $nic_conf->{$nic}->{'mask'} =
     2393                                ($temp = $d->inputbox(text=>
     2394                                                      "$nic Subnet mask (mandatory)")) ? $temp : undef;
     2395                           
     2396                            if(!$self->is_dialog_ok($d)) {
     2397                                redo FIND_EXT_NIC;
     2398                            }
     2399                        }
    23962400                       
     2401                        $nic_conf->{$nic}->{'gw'} = ($temp = $d->inputbox(text=>"$nic Gateway (optional)")) ? $temp : undef;
    23972402                        if(!$self->is_dialog_ok($d)) {
    23982403                            redo FIND_EXT_NIC;
    23992404                        }
    2400                        
    2401                         $nic_conf->{$nic}->{'gw'} = ($temp = $d->inputbox(text=>"$nic Gateway (optional)")) ? $temp : undef;
    24022405                    }
    24032406                } while(!defined($nic_conf->{$nic}->{'ipaddr'}) || !defined($nic_conf->{$nic}->{'mask'}));
  • bccd-ng/tags/bccd-3.1.1-rc/trees/usr/share/menu

Note: See TracChangeset for help on using the changeset viewer.