#!/bin/sh
PATCH_START()
{
    #add your code here
    return 
}
PATCH_END()
{
    #add your code here   
    
    mkdir /tmp/cli_path_018_cli
    tar -xf /ISM/cli_v5r7C61_DTS202104220GP1N4P1300.tgz -C /tmp/cli_path_018_cli/
    
    #back up file
	mkdir /ISM/cli_bak_018
	mkdir -p /ISM/cli_bak_018/cmd_autogen/	
    cp -arf /ISM/cli/cmd_autogen/change.file_system.general /ISM/cli_bak_018/cmd_autogen/
	
	#cp file
    cp -rf /tmp/cli_path_018_cli/change.file_system.general /ISM/cli/cmd_autogen/
	    
	#restart server
	killall -s 9 CLI_Server
	
    rm -rf /tmp/cli_path_018_cli
    return
}
PATCH_ROLLBACK()
{
    #add your code here
    #rollback file	
    cp -rf /ISM/cli_bak_018/cmd_autogen/change.file_system.general /ISM/cli/cmd_autogen/
	    
	#restart server
	killall -s 9 CLI_Server
	
    rm -rf /ISM/cli_bak_018	
    return
}
PATCH_ROLLEND()
{
    #add your code here
    return
}
L_CMD=$1
case $L_CMD in
    "start") PATCH_START
               ;;
    "end") PATCH_END
               ;;
    "rollstart") PATCH_ROLLBACK
               ;;
    "rollend") PATCH_ROLLEND
  ;;
    *)
        OS_echo "unsupported option."
esac
exit 0
