X7ROOT File Manager
Current Path:
/usr/local/VMOptimizationTools_2.69.0
usr
/
local
/
VMOptimizationTools_2.69.0
/
๐
..
๐
LinuxUpdate.XML
(647 B)
๐
SangforVMSTool
(3.11 KB)
๐
SangforVMSTool.service
(194 B)
๐
action_common.sh
(13.34 KB)
๐
busybox_cmd_ln.sh
(2.24 KB)
๐
collect_test_data.sh
(1.16 KB)
๐
common_config.sh
(278 B)
๐
data_test_tool.sh
(16.62 KB)
๐
debian_vmconfig.sh
(13.48 KB)
๐
driver
๐
guest_system_config.sh
(1.82 KB)
๐
hostname_config
(1 B)
๐
ipv6_network_config
(94 B)
๐
log.sh
(1.36 KB)
๐
mod_test.sh
(3.69 KB)
๐
mod_test1.sh
(914 B)
๐
net_common.sh
(915 B)
๐
network_compat_flag
(0 B)
๐
network_config
(86 B)
๐
pwd_info_config
(1 B)
๐
redhat_vmconfig.sh
(17.93 KB)
๐
reset_duid_config
(21 B)
๐
sangfor_guest_datareport
(25.63 KB)
๐
sangfor_heartalive.sh
(2.37 KB)
๐
sangfor_module_update
(28.11 KB)
๐
sangfor_set_network.sh
(504 B)
๐
sangfor_sfping
(4.23 KB)
๐
sangfor_sshkey_gen
(1.29 KB)
๐
sangfor_update_ipc_callback
(5.29 KB)
๐
sangfor_vm_proxyd
(3.45 KB)
๐
sangfor_vm_proxyd_r
(4.4 KB)
๐
sangfor_vm_proxyd_w
(1.32 KB)
๐
sangfor_vmconfig
(3.55 KB)
๐
sangfor_vmconfig_common
(38.34 KB)
๐
sangfor_vmconfig_ipc_callback
(4.75 KB)
๐
sangfor_watchdog
(3.95 KB)
๐
sfping
(17.7 KB)
๐
sfping.pl
(8.57 KB)
๐
startall
(1.78 KB)
๐
stopall
(1.11 KB)
๐
suse_vmconfig.sh
(10.07 KB)
๐
tools_x64
๐
tools_x86
๐
uni_test.sh
(2.59 KB)
๐
update_common_func
(4.35 KB)
๐
update_common_header
(4.86 KB)
๐
update_config
(2.89 KB)
๐
update_install
(33.63 KB)
๐
update_network.flag
(1 B)
๐
virtio_nic_attr_set.sh
(2.42 KB)
๐
virtio_nic_compat.sh.old1610337499
(5.64 KB)
๐
vm_ip_recover.sh
(16.66 KB)
๐
vm_ipc.sh
(9.06 KB)
๐
vmconfig_common_func
(23.11 KB)
๐
vmconfig_common_header
(3.37 KB)
๐
vmconfig_config
(1.02 KB)
๐
vmtools-install.sh
(31.16 KB)
๐
watch_test.sh
(313 B)
๐
watchdog.sh
(1.39 KB)
๐
x64
๐
x86
Editing: SangforVMSTool
#! /bin/bash ### BEGIN INIT INFO # Provides: SangforVMSTool # Required-Start: $remote_fs # Required-Stop: # Default-Start: # Default-Stop: # Short-Description: Install vm tools in system ### END INIT INFO #shell_dir=$((dirname readlink $0)) if [ -L "${BASH_SOURCE[0]}" ];then shell_dir="$(readlink "${BASH_SOURCE[0]}")" else shell_dir="${BASH_SOURCE[0]}" fi #The two link layer if [ -L "${shell_dir}" ];then shell_dir=$( cd "$( dirname "$(readlink "${shell_dir}")" )" && pwd ) else shell_dir=$( cd "$( dirname "${shell_dir}" )" && pwd ) fi #shell_dir=$( cd "$( dirname "$(readlink "${BASH_SOURCE[0]}")" )" && pwd ) # shell_dir=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) . "${shell_dir}/update_config" . "${shell_dir}/log.sh" . "${shell_dir}/update_common_func" #start all services after the system boot. set_log_filepath "${g_sangfor_log_dir}/${g_boot_shell_file}.log" log_debug "`date`" log_debug "${shell_dir}" # Check the virtio_net devices whether there exists. # exist return 0 # not exist return 1 check_virtio_net_devices(){ local str_virtio_net="" local str_virtio_blk="" if [ ! -d "${g_virtio_devices_dir}" ];then # no exist๏ผno virtio log_error "${g_virtio_devices_dir} is not exist or is not a directory!" return 1 fi #exist and it is a directory #the virtio_net is not exist๏ผreturn 1 str_virtio_net=`ls -l "${g_virtio_devices_dir}"/*/ 2>/dev/null | grep virtio_net ` str_virtio_blk=`ls -l "${g_virtio_devices_dir}"/*/ 2>/dev/null | grep virtio_blk` if [ "${str_virtio_net}" = "" ] && [ "${str_virtio_blk}" = "" ];then log_error "${g_virtio_devices_dir} not contain virtio_net and virtio_blk driver!" return 1 fi log_debug "system contain virtio net devices." return 0 } virtio_nic_compat(){ # ไป ๆง่กไธๆฌกvirtio็ฝๅก็็ฝ็ป่ฟๆฅ้ ็ฝฎๅ ผๅฎนๆงๅค็ if [ ! -e "${shell_dir}/${g_virtio_nic_compat}" ]; then return 0 fi log_debug "virtio nic compat ${shell_dir}/${g_virtio_nic_compat}" "${shell_dir}/${g_virtio_nic_compat}" && mv "${shell_dir}/${g_virtio_nic_compat}" "${shell_dir}/${g_virtio_nic_compat}.old`date +%s`" & return 0 } # start all check_and_start_all(){ #Check virtio_net check_virtio_net_devices if [ $? -eq 0 ];then #set nic attr log_debug "set virtio nic attr ${shell_dir}/${g_virtio_nic_attr_file}" "${shell_dir}/${g_virtio_nic_attr_file}" & # ๅฟฝ็ฅ่ฟๅๅผ๏ผๅ ผๅฎนๆงๅค็ๅคฑ่ดฅๅฏ่ฝไผๅฏผ่ด็ฝ็ปๅผๅธธ๏ผๅฏ่ฝๆฏๅบๆฏ่่ไธๅจๅ จ virtio_nic_compat fi #Run the startall shell file to start all services. "${shell_dir}/${g_startall_shell_file}" & log_debug "run startall to start all services." return } case "$1" in "start") echo 0 > /proc/sys/kernel/nmi_watchdog check_and_start_all ;; "stop") #Run the stopall shell file to stop all services. "${shell_dir}/${g_stopall_shell_file}" log_debug "run stopall to stop all services." ;; *) #default. Nothing to do. log_debug "default is not to do anything!" esac log_debug "END" exit 0
Upload File
Create Folder