文件操作 - dsm_om_connsvc-helper
返回文件管理
返回主菜单
删除本文件
文件: /opt/dell/srvadmin/sbin/dsm_om_connsvc-helper
编辑文件内容
#!/usr/bin/env bash ############################################################################### # # Dell Inc. PROPRIETARY INFORMATION # This software is supplied under the terms of a license agreement or # nondisclosure agreement with Dell Inc. and may not # be copied or disclosed except in accordance with the terms of that # agreement. # # Copyright (c) 2000-2018 Dell Inc. All Rights Reserved. # # Module Name: # # dsm_om_connsvc-helper # # Abstract/Purpose: # # DSM SA Connection Service Environment Variables # # Environment: # # Linux # # Notes: # # ############################################################################### PROGRAM_INI_ROOT="/opt/dell/srvadmin/etc/openmanage/oma/ini" # current jre version currentjrepath=$(grep omajvmpath ${PROGRAM_INI_ROOT}/omprv.ini) currentjrepath=${currentjrepath#omajvmpath=} currentjreversion=$(grep omajvmversion ${PROGRAM_INI_ROOT}/omprv.ini) # bundled jre version bundledjrepath=$(grep BundledJREPath ${PROGRAM_INI_ROOT}/omprv.ini) bundledjrepath=${bundledjrepath#BundledJREPath=} bundledjreversion=$(grep BundledJREVersion ${PROGRAM_INI_ROOT}/omprv.ini) bundledjreversion=${bundledjreversion#BundledJREVersion=} JAVA_FILE="${currentjrepath}/bin/java" if [ ! -f ${JAVA_FILE} ]; then # replace currentjrepath with bundledjre sed -i "s%$currentjrepath%$bundledjrepath%g" ${PROGRAM_INI_ROOT}/omprv.ini # replace currentjreversion with bundlejre version sed -i "s%$currentjreversion%omajvmversion=${bundledjreversion}%g" ${PROGRAM_INI_ROOT}/omprv.ini fi sLibPath=$(grep omalibrarypath ${PROGRAM_INI_ROOT}/omprv.ini) sLibPath=${sLibPath#omalibrarypath=} sLibPath=${sLibPath//,/:} echo $sLibPath
修改文件时间
将文件时间修改为当前时间的前一年
删除文件