mirror of
				https://github.com/xcat2/xcat-core.git
				synced 2025-11-04 05:12:30 +00:00 
			
		
		
		
	syslog postscript check for config files
This commit is contained in:
		@@ -179,26 +179,32 @@ config_rsyslog_V8()
 | 
			
		||||
    cp -f $conf_file $conf_file.XCATORIG
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
  # check if already an old entry by xCAT. If so, we need to remove it
 | 
			
		||||
  grep "$xCATSettingsOLD$" $conf_file 2>&1 1> /dev/null
 | 
			
		||||
  if [ $? -eq 0 ]; then
 | 
			
		||||
       sed -i "/$xCATSettingsOLD/,+1 d" $conf_file
 | 
			
		||||
  if [ -e $conf_file ]; then
 | 
			
		||||
      # check if already an old entry by xCAT. If so, we need to remove it
 | 
			
		||||
      grep "$xCATSettingsOLD$" $conf_file 2>&1 1> /dev/null
 | 
			
		||||
      if [ $? -eq 0 ]; then
 | 
			
		||||
          sed -i "/$xCATSettingsOLD/,+1 d" $conf_file
 | 
			
		||||
      fi
 | 
			
		||||
 | 
			
		||||
      # check if already a previous entry by xCAT. If so, we need to remove it
 | 
			
		||||
      grep "$xCATSettingsSTART" $conf_file 2>&1 1> /dev/null
 | 
			
		||||
      if [ $? -eq 0 ]; then
 | 
			
		||||
          sed -i "/$xCATSettingsSTART/,/$xCATSettingsEND/ d" $conf_file
 | 
			
		||||
      fi
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
  grep "$xCATSettingsOLD$" $remoteconf 2>&1 1> /dev/null
 | 
			
		||||
  if [ $? -eq 0 ]; then
 | 
			
		||||
       sed -i "/$xCATSettingsOLD/,+1 d" $remoteconf
 | 
			
		||||
  fi
 | 
			
		||||
  if [ -e $remoteconf ]; then
 | 
			
		||||
      # check if already an old entry by xCAT. If so, we need to remove it
 | 
			
		||||
      grep "$xCATSettingsOLD$" $remoteconf 2>&1 1> /dev/null
 | 
			
		||||
      if [ $? -eq 0 ]; then
 | 
			
		||||
          sed -i "/$xCATSettingsOLD/,+1 d" $remoteconf
 | 
			
		||||
      fi
 | 
			
		||||
 | 
			
		||||
  # check if already a previous entry by xCAT. If so, we need to remove it
 | 
			
		||||
  grep "$xCATSettingsSTART" $conf_file 2>&1 1> /dev/null
 | 
			
		||||
  if [ $? -eq 0 ]; then
 | 
			
		||||
        sed -i "/$xCATSettingsSTART/,/$xCATSettingsEND/ d" $conf_file
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
  grep "$xCATSettingsSTART" $remoteconf 2>&1 1> /dev/null
 | 
			
		||||
  if [ $? -eq 0 ]; then
 | 
			
		||||
     sed -i "/$xCATSettingsSTART/,/$xCATSettingsEND/ d" $remoteconf
 | 
			
		||||
      # check if already a previous entry by xCAT. If so, we need to remove it
 | 
			
		||||
      grep "$xCATSettingsSTART" $remoteconf 2>&1 1> /dev/null
 | 
			
		||||
      if [ $? -eq 0 ]; then
 | 
			
		||||
          sed -i "/$xCATSettingsSTART/,/$xCATSettingsEND/ d" $remoteconf
 | 
			
		||||
      fi
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
  if [ $goLocal -eq 1 ]; then
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user