X7ROOT File Manager
Current Path:
/var/VMOptimizationToolsLinux
var
/
VMOptimizationToolsLinux
/
📁
..
📄
LinuxUpdate.XML
(645 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
(12.59 KB)
📄
debian_vmconfig.sh
(10.74 KB)
📄
guest_system_config.sh
(1.82 KB)
📄
log.sh
(1.36 KB)
📄
mod_test.sh
(3.69 KB)
📄
mod_test1.sh
(914 B)
📄
net_common.sh
(915 B)
📄
redhat_vmconfig.sh
(11.14 KB)
📄
sangfor_guest_datareport
(21.66 KB)
📄
sangfor_heartalive.sh
(2.37 KB)
📄
sangfor_module_update
(28.11 KB)
📄
sangfor_set_network.sh
(504 B)
📄
sangfor_sfping
(3.85 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
(2.4 KB)
📄
sangfor_vmconfig_common
(27.99 KB)
📄
sangfor_vmconfig_ipc_callback
(4.75 KB)
📄
sangfor_watchdog
(3.95 KB)
📄
sfping.c
(15.68 KB)
📄
sfping.pl
(6.15 KB)
📄
startall
(1.78 KB)
📄
stopall
(1.11 KB)
📄
suse_vmconfig.sh
(6.19 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
(28.84 KB)
📄
virtio_nic_attr_set.sh
(2.42 KB)
📄
virtio_nic_compat.sh
(5.28 KB)
📄
vm_ip_recover.sh
(16.66 KB)
📄
vm_ipc.sh
(9.06 KB)
📄
vmconfig_common_func
(10.76 KB)
📄
vmconfig_common_header
(3.37 KB)
📄
vmconfig_config
(805 B)
📄
vmtools-install.sh
(31.16 KB)
📄
watch_test.sh
(313 B)
📄
watchdog.sh
(1.39 KB)
📁
x64
📁
x86
Editing: busybox_cmd_ln.sh
#!/bin/bash #Please use shell built-in commands #open aliase features shopt -s expand_aliases #get current path g_current_dir=$(cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd) . "${g_current_dir}/log.sh" #The log file path. log_file="/var/log/sangfor_busybox_cmd_ln.log" set_log_filepath "${log_file}" function log_exit() { log "$@" exit 0 } bin="/usr/bin/" [ ! -d "$bin" ] && bin="/bin/" #check system is x86 or x64 x86_or_x64="" info="`uname -a 2>/dev/null`" if [ x"${info/x86_64/}" = x"${info}" ];then #x86 x86_or_x64="x86" else x86_or_x64="x64" fi log "system is ${x86_or_x64}" #check the system supports busybox x86 or x64 or none busybox_path="" if [ x"$x86_or_x64" == x"x86" ];then busybox_path="${g_current_dir}/tools_x86/busybox" elif [ x"$x86_or_x64" == x"x64" ];then busybox_path="${g_current_dir}/tools_x64/busybox" else log_exit "Err: System not supports busybox." fi log "busybox_path: ${busybox_path}" if ! type busybox > /dev/null 2>&1 ; then $busybox_path cp -af "$busybox_path" $bin || log_exit "Err: ${busybox_path}" fi #check ln/sed cmd type ln > /dev/null 2>&1 || busybox ln -sf $(which busybox) "${bin}/ln" type sed > /dev/null 2>&1 || ln -sf $(which busybox) "${bin}/sed" #busybox commands busybox_help=$(busybox) busybox_cmd_str=$(echo $busybox_help | sed -n 's/.*Currently defined functions:\(.*\)/\1/p') busybox_cmd_str=$(echo $busybox_cmd_str | sed 's/,//'g) function m_base64() { type base64 > /dev/null 2>&1 && return if [ x"$x86_or_x64" == x"x86" ];then cp -af "${g_current_dir}/tools_x86/base64" $bin elif [ x"$x86_or_x64" == x"x64" ];then cp -af "${g_current_dir}/tools_x64/base64" $bin else log_exit "Err: System not supports base64." fi } function main() { for busybox_cmd in $busybox_cmd_str; do type $busybox_cmd > /dev/null 2>&1 if [ $? -ne 0 ] ; then #str="alias ${cmd_str}=\"busybox ${cmd_str}\"" #eval $str ln -sf $(which busybox) "${bin}/${busybox_cmd}" if [ $? -ne 0 ];then log "Err: ln -s $(which busybox) ${bin}/${busybox_cmd}" else log "OK: ln -s $(which busybox) ${bin}/${busybox_cmd}" fi fi done m_base64 } main
Upload File
Create Folder