diff --git a/features/cm/software.go b/features/cm/software.go index 9614e1f0..8c3616e8 100644 --- a/features/cm/software.go +++ b/features/cm/software.go @@ -698,8 +698,8 @@ func ActiveSoftwareToNF(w http.ResponseWriter, r *http.Request) { return } - runCmd := fmt.Sprintf("sudo %s/actpkg.sh '%s' %s", - config.GetYamlConfig().NE.ScpDir, filePath, neTypeUpper) + runCmd := fmt.Sprintf("sudo %s/actpkg.sh %s '%s'", + config.GetYamlConfig().NE.ScpDir, neTypeUpper, filePath) if neTypeLower == "omc" { idNeVersion, _ := strconv.Atoi((*neVersion)[0]["id"]) neVersionData := dborm.NeVersion{ @@ -898,8 +898,8 @@ func RollBackSoftwareToNF(w http.ResponseWriter, r *http.Request) { return } - runCmd := fmt.Sprintf("sudo %s/rbkpkg.sh '%s'", - config.GetYamlConfig().NE.ScpDir, filePath) + runCmd := fmt.Sprintf("sudo %s/rbkpkg.sh %s '%s'", + config.GetYamlConfig().NE.ScpDir, neTypeUpper, filePath) if neTypeLower == "omc" { idNeVersion, _ := strconv.Atoi((*neVersion)[0]["id"]) neVersionData := dborm.NeVersion{ diff --git a/misc/rbkpkg.sh b/misc/rbkpkg.sh index f742bc6e..2e2d389a 100644 --- a/misc/rbkpkg.sh +++ b/misc/rbkpkg.sh @@ -1,10 +1,14 @@ #!/bin/bash filename="$1" +neType="$2" extension=$(basename "${1}" | awk -F . '{print $NF}') case "${extension}" in deb) + if [ neType == "OMC" ]; then + systemctl stop restagent.service + fi expect <