mirror of
				https://git.proxmox.com/git/mirror_frr
				synced 2025-10-31 16:56:31 +00:00 
			
		
		
		
	 a9433f2a4e
			
		
	
	
		a9433f2a4e
		
	
	
	
	
		
			
			User data might not be stored in the files in etc. getent is the dedicated tool to extract those information, regardless of where the user data is stored Signed-off-by: Rhonda D'Vine <rhonda@proxmox.com>
		
			
				
	
	
		
			35 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			Bash
		
	
	
	
	
	
			
		
		
	
	
			35 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			Bash
		
	
	
	
	
	
| #!/bin/bash -e
 | |
| 
 | |
| ######################
 | |
| frruid=`getent passwd frr | awk -F ":" '{ print $3 }'`
 | |
| frrgid=`getent group frr | awk -F ":" '{ print $3 }'`
 | |
| frrvtygid=`getent group frrvty | awk -F ":" '{ print $3 }'`
 | |
| 
 | |
| [ -n ${frruid} ]    || (echo "No uid for frr"    && /bin/false)
 | |
| [ -n ${frrgid} ]    || (echo "No gid for frr"    && /bin/false)
 | |
| [ -n ${frrVTYgid} ] || (echo "No gid for frrvty" && /bin/false)
 | |
| 
 | |
| chown ${frruid}:${frrgid} /etc/frr
 | |
| chown ${frruid}:${frrgid} /etc/frr/*
 | |
| touch /etc/frr/vtysh.conf
 | |
| chgrp ${frrvtygid} /etc/frr/vtysh*
 | |
| chmod 644 /etc/frr/*
 | |
| 
 | |
| ENVIRONMENTFILE=/etc/environment
 | |
| if ! egrep --quiet '^VTYSH_PAGER=' ${ENVIRONMENTFILE}; then
 | |
|     echo "VTYSH_PAGER=/bin/cat"  >> ${ENVIRONMENTFILE}
 | |
| fi
 | |
| ##################################################
 | |
| 
 | |
| if [ -n "$DEBIAN_SCRIPT_DEBUG" ]; then set -v -x; DEBIAN_SCRIPT_TRACE=1; fi
 | |
| ${DEBIAN_SCRIPT_TRACE:+ echo "#42#DEBUG# RUNNING $0 $*"}
 | |
| 
 | |
| # This is most likely due to the answer "no" to the "really stop the server"
 | |
| # question in the prerm script.
 | |
| if [ "$1" = "abort-upgrade" ]; then
 | |
|   exit 0
 | |
| fi
 | |
| 
 | |
| #DEBHELPER#
 | |
| 
 |