Changeset 172 for drbl-virt/sbin/functions_drbl_virt
- Timestamp:
- Aug 10, 2010, 4:40:41 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
drbl-virt/sbin/functions_drbl_virt
r171 r172 97 97 function check_xen_nu(){ 98 98 Kernels=$(ls /boot | grep vmlinuz) 99 declare -i Kernels_nu=$(echo $Kernels | wc -w) 99 100 Kernel_choose="" 101 102 Xens=$(ls /boot | grep -i ^xen) 103 declare -i Xen_nu=$(echo $Xen | wc -w) 104 Xen_choose="" 105 100 106 jude="no" 101 107 … … 103 109 do 104 110 declare -i i=1 111 declare -i j=1 105 112 echo "" 106 113 107 for Kernel in $Kernels 108 do 109 echo "($i) $Kernel" 110 i=i+1 111 done 114 if [ $Kernels_nu -gt 1 ]; then 115 for Kernel in $Kernels 116 do 117 echo "($i) $Kernel" 118 i=i+1 119 done 112 120 113 read -p "Xen Kenrel is (1/2/...): " Kernel_choose 121 read -p "Xen Kenrel is (1/2/...): " Kernel_choose 122 Xen_Kernel=$(echo $Kernels | cut -d " " -f${Kernel_choose}) 123 124 else 125 Xen_Kernel=$Kernels 126 fi 127 128 if [ $Xen_nu -gt 1 ]; then 129 for Xen in $Xens 130 do 131 echo "($i) $Xen" 132 j=j+1 133 done 134 135 read -p "Xen is (1/2/...): " Xen_choose 136 Xen=$(echo $Xens | cut -d " " -f${Xen_choose}) 137 else 138 Xen=$Xens 139 fi 140 114 141 read -p "Are you sure (yes/no): " jude 115 142 done 116 143 117 Xen_Kernel=$(echo $Kernels | cut -d " " -f${Kernel_choose}) 144 118 145 #echo "debug: Xen_Kernel=$Xen_Kernel" 119 146 }
Note: See TracChangeset
for help on using the changeset viewer.