Changeset 177 for drbl-virt/sbin


Ignore:
Timestamp:
Aug 11, 2010, 6:19:58 PM (14 years ago)
Author:
rock
Message:

Modify: declare -> bash

File:
1 edited

Legend:

Unmodified
Added
Removed
  • drbl-virt/sbin/drbl_xen_patch.sh

    r176 r177  
    3838generate_PXE_menu="/opt/drbl/sbin/generate-pxe-menu"
    3939declare -i modify_line=$(cat -n $generate_PXE_menu | grep 'label drbl' | awk 'NR==1 {print $1}')
     40# delete default
     41sed -i '/^  MENU DEFAULT/d' $generate_PXE_menu
    4042# modify menu
    4143sed -i "${modify_line}i\label drbl-virt" $generate_PXE_menu
     
    6769declare -i modify_line=$(cat -n /usr/bin/mkpxeinitrd-net | grep 'include_bin_prog_from_server=' | awk '{print $1}')
    6870modify_file="/usr/bin/mkpxeinitrd-net"
    69 sed -i "${modify_line}c\include_bin_prog_from_server='sleep lspci insmod modprobe rmmod lsmod pkill strings brctl ip egrep awk gawk seq fgrep dirname expr'" $modify_file
     71sed -i "${modify_line}c\include_bin_prog_from_server='sleep lspci insmod modprobe rmmod lsmod pkill strings brctl ip egrep awk gawk seq fgrep dirname expr bash'" $modify_file
    7072sed -i "${modify_line}i# drbl-virt add" $modify_file
    7173# patch it to copy modules
     
    7981# == Run Xen network-bridge in booting (/usr/lib/mkpxeinitrd-net/initrd-skel/linuxrc-or-init) ==
    8082cat <<EOF >/usr/lib/mkpxeinitrd-net/initrd-skel/bin/start_xen_bridge.sh
     83#!/bin/bash
    8184# drbl-virt add
    8285NICs=\$(/sbin/ifconfig | grep eth | awk '{print \$1}')
     
    97100fi
    98101
    99 sh /bin/network-bridge start netdev=\$NIC
     102bash /bin/network-bridge start netdev=\$NIC
    100103EOF
    101104# backup
     
    106109sed -i "${modify_line}i# drbl-virt add" $modify_file
    107110modify_line=$modify_line+1
    108 sed -i "${modify_line}ish /bin/start_xen_bridge.sh" $modify_file
     111sed -i "${modify_line}ibash /bin/start_xen_bridge.sh" $modify_file
    109112
    110113
Note: See TracChangeset for help on using the changeset viewer.