mirror of
				https://github.com/Telecominfraproject/ols-nos.git
				synced 2025-10-31 18:17:52 +00:00 
			
		
		
		
	 a46f4c96e7
			
		
	
	a46f4c96e7
	
	
	
		
			
			Signed-off-by: Arvindsrinivasan Lakshmi Narasimhan <arlakshm@microsoft.com> This PR has changes to support accessing the bcmsh and bcmcmd utilities on multi ASIC devices Changes done - move the link of /var/run/sswsyncd from docker-syncd-brcm.mk to docker_image_ctl.j2 - update the bcmsh and bcmcmd scripts to take -n [ASIC_ID] as an argument on multi ASIC platforms
		
			
				
	
	
		
			41 lines
		
	
	
		
			715 B
		
	
	
	
		
			Bash
		
	
	
	
	
	
			
		
		
	
	
			41 lines
		
	
	
		
			715 B
		
	
	
	
		
			Bash
		
	
	
	
	
	
| #!/bin/bash
 | |
| 
 | |
| function help()
 | |
| {
 | |
|     echo "Usage: $0 -n [0 to $(($NUM_ASIC-1))]" 1>&2; exit 1;
 | |
| 
 | |
| }
 | |
| 
 | |
| 
 | |
| DEV=""
 | |
| 
 | |
| PLATFORM=`sonic-cfggen -H -v DEVICE_METADATA.localhost.platform`
 | |
| 
 | |
| # Parse the device specific asic conf file, if it exists
 | |
| 
 | |
| ASIC_CONF=/usr/share/sonic/device/$PLATFORM/asic.conf
 | |
| if [ -f "$ASIC_CONF" ]; then
 | |
|     source $ASIC_CONF
 | |
| fi
 | |
| 
 | |
| 
 | |
| if [[ ($NUM_ASIC -gt 1) ]]; then
 | |
|     OPTIND=1
 | |
| 
 | |
|     while getopts ":n:h:" opt; do
 | |
|         case "${opt}" in
 | |
|             h) help
 | |
|                exit 0
 | |
|                ;;
 | |
|             n) DEV=${OPTARG}
 | |
|                [ $DEV -lt $NUM_ASIC -a  $DEV -ge 0 ] || help
 | |
|                ;;
 | |
|         esac
 | |
|     done
 | |
|     shift "$((OPTIND-1))"
 | |
| 
 | |
|     if [ -z "${DEV}" ]; then
 | |
|         help
 | |
|     fi
 | |
| fi
 |