mirror of
				https://github.com/Telecominfraproject/ols-nos.git
				synced 2025-10-30 17:48:09 +00:00 
			
		
		
		
	 f978b2bb53
			
		
	
	f978b2bb53
	
	
	
		
			
			#### Why I did it To fix the timezone sync issue between the containers and the host. If a certain timezone has been configured on the host (SONIC) then the expectation is to reflect the same across all the containers. This will fix [Issue:13046](https://github.com/sonic-net/sonic-buildimage/issues/13046). For instance, a PST timezone has been set on the host and if the user checks the link flap logs (inside the FRR), it shows the UTC timestamp. Ideally, it should be PST.
		
			
				
	
	
		
			27 lines
		
	
	
		
			939 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			27 lines
		
	
	
		
			939 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
| #!/usr/bin/env bash
 | |
| 
 | |
| if [ "${RUNTIME_OWNER}" == "" ]; then
 | |
|     RUNTIME_OWNER="kube"
 | |
| fi
 | |
| 
 | |
| CTR_SCRIPT="/usr/share/sonic/scripts/container_startup.py"
 | |
| if test -f ${CTR_SCRIPT}
 | |
| then
 | |
|     ${CTR_SCRIPT} -f dhcp_relay -o ${RUNTIME_OWNER} -v ${IMAGE_VERSION}
 | |
| fi
 | |
| 
 | |
| TZ=$(cat /etc/timezone)
 | |
| rm -rf /etc/localtime
 | |
| ln -sf /usr/share/zoneinfo/$TZ /etc/localtime
 | |
| 
 | |
| # If our supervisor config has entries in the "dhcp-relay" group...
 | |
| if [ $(supervisorctl status | grep -c "^dhcp-relay:") -gt 0 ]; then
 | |
|     # Wait for all interfaces to come up and be assigned IPv4 addresses before
 | |
|     # starting the DHCP relay agent(s). If an interface the relay should listen
 | |
|     # on is down, the relay agent will not start. If an interface the relay
 | |
|     # should listen on is up but does not have an IP address assigned when the
 | |
|     # relay agent starts, it will not listen or send on that interface for the
 | |
|     # lifetime of the process.
 | |
|     /usr/bin/wait_for_intf.sh
 | |
| fi
 |