Changeset 177 for drbl-virt/sbin
- Timestamp:
- Aug 11, 2010, 6:19:58 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
drbl-virt/sbin/drbl_xen_patch.sh
r176 r177 38 38 generate_PXE_menu="/opt/drbl/sbin/generate-pxe-menu" 39 39 declare -i modify_line=$(cat -n $generate_PXE_menu | grep 'label drbl' | awk 'NR==1 {print $1}') 40 # delete default 41 sed -i '/^ MENU DEFAULT/d' $generate_PXE_menu 40 42 # modify menu 41 43 sed -i "${modify_line}i\label drbl-virt" $generate_PXE_menu … … 67 69 declare -i modify_line=$(cat -n /usr/bin/mkpxeinitrd-net | grep 'include_bin_prog_from_server=' | awk '{print $1}') 68 70 modify_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_file71 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 bash'" $modify_file 70 72 sed -i "${modify_line}i# drbl-virt add" $modify_file 71 73 # patch it to copy modules … … 79 81 # == Run Xen network-bridge in booting (/usr/lib/mkpxeinitrd-net/initrd-skel/linuxrc-or-init) == 80 82 cat <<EOF >/usr/lib/mkpxeinitrd-net/initrd-skel/bin/start_xen_bridge.sh 83 #!/bin/bash 81 84 # drbl-virt add 82 85 NICs=\$(/sbin/ifconfig | grep eth | awk '{print \$1}') … … 97 100 fi 98 101 99 sh /bin/network-bridge start netdev=\$NIC102 bash /bin/network-bridge start netdev=\$NIC 100 103 EOF 101 104 # backup … … 106 109 sed -i "${modify_line}i# drbl-virt add" $modify_file 107 110 modify_line=$modify_line+1 108 sed -i "${modify_line}i sh /bin/start_xen_bridge.sh" $modify_file111 sed -i "${modify_line}ibash /bin/start_xen_bridge.sh" $modify_file 109 112 110 113
Note: See TracChangeset
for help on using the changeset viewer.