source: drbl-virt/sbin/drbl_xen_patch.sh @ 171

Last change on this file since 171 was 171, checked in by rock, 14 years ago

Add: DRBL patch for Xen

  • Property svn:executable set to *
File size: 1.6 KB
Line 
1#!/bin/bash
2# Program:
3#   Path DRBL evironment to support Xen/KVM
4# Author:
5#   Jazz, Rock {jazz, rock}@nchc.org.tw
6# Version:
7#    1.0
8# History:                                                                                         
9#   2010/07/20  Rock    First release (1.0)
10
11# [Source]
12source functions_drbl_virt
13source /opt/drbl-virt/conf/drbl-virt.conf
14
15# [Main]
16
17# = 1. Patch DRBL xen env for client =
18# == Shutdown all drbl client ==
19echo "Please check all client are shutdown !!!"
20read -p "Push 'Enter' to continue......"
21
22# == Change xen kernel for drbl client ==
23check_xen_nu
24Xen_Kernel=$(echo $Xen_Kernel | sed 's/^vmlinuz-//g' )
25echo "/opt/drbl/sbin/drblsrv-offline -s $Xen_Kernel"
26#/opt/drbl/sbin/drblsrv-offline -s $Xen_Kernel
27echo ""
28
29# == Re-delpoy drbl client ==
30echo "Re-delpoy drbl client"
31echo "/opt/drbl/sbin/drblpush -c /etc/drbl/drblpush.conf"
32#/opt/drbl/sbin/drblpush -c /etc/drbl/drblpush.conf
33echo ""
34
35# == Copy xen image to /tftpboot/nbi_img/ ==
36echo "copy Xen image & Kernel to /tftpboot/nbi_img/"
37cp /boot/*xen* /tftpboot/nbi_img/
38cp /boot/vmlinuz-${Xen_Kernel} /tftpboot/nbi_img/
39cp /boot/initrd.img-${Xen_Kernel} /tftpboot/nbi_img/
40cp /boot/config-${Xen_Kernel} /tftpboot/nbi_img/
41echo ""
42
43# == Modify PXE booting menu ==
44# backup
45cp /tftpboot/nbi_img/pxelinux.cfg/default /tftpboot/nbi_img/pxelinux.cfg/default.drbl-virt_bak
46
47
48# = 2. Patch DRBL initrd to support bridge =
49# == Patch /usr/bin/mkpxeinitrd-net (1)modules (2)xen network scripts ==
50
51# == Copy xen netwrok scripts ==
52
53# == run xen network scripts (/usr/lib/mkpxeinitrd-net/initrd-skel/linuxrc-or-init) ==
54
55
56
Note: See TracBrowser for help on using the repository browser.