Add missing files for GNU/kFreeBSD
This commit is contained in:
		
				
					committed by
					
						 William Hubbs
						William Hubbs
					
				
			
			
				
	
			
			
			
						parent
						
							3f82edbeb9
						
					
				
				
					commit
					d8e1d9a6ed
				
			
							
								
								
									
										4
									
								
								conf.d/network.GNU-kFreeBSD.in
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								conf.d/network.GNU-kFreeBSD.in
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,4 @@ | ||||
|  | ||||
| # You can assign a default route | ||||
| #defaultroute="192.168.0.1" | ||||
| #defaultroute6="2001:a:b:c" | ||||
							
								
								
									
										5
									
								
								conf.d/staticroute.GNU-kFreeBSD.in
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								conf.d/staticroute.GNU-kFreeBSD.in
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,5 @@ | ||||
| # Separate multiple routes using ; or new lines. | ||||
|  | ||||
| # Example static routes. See route(8) for syntax. | ||||
| #staticroute="net 192.168.0.0 10.73.1.1 netmask 255.255.255.0 | ||||
| #net 192.168.1.0 10.73.1.1 netmask 255.255.255.0" | ||||
							
								
								
									
										31
									
								
								init.d/sysctl.GNU-kFreeBSD.in
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										31
									
								
								init.d/sysctl.GNU-kFreeBSD.in
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,31 @@ | ||||
| #!@SBINDIR@/openrc-run | ||||
| # Copyright (c) 2007-2009 Roy Marples <roy@marples.name> | ||||
| # Released under the 2-clause BSD license. | ||||
|  | ||||
| depend() | ||||
| { | ||||
| 	before bootmisc logger | ||||
| 	keyword -prefix | ||||
| } | ||||
|  | ||||
| start() | ||||
| { | ||||
| 	[ -e /etc/sysctl.conf ] || return 0 | ||||
| 	local retval=0 var= comments= conf= | ||||
| 	ebegin "Configuring kernel parameters" | ||||
| 	eindent | ||||
| 	for conf in @SYSCONFDIR@/sysctl.conf @SYSCONFDIR@/sysctl.d/*.conf; do | ||||
| 		if [ -r "$conf" ]; then | ||||
| 			vebegin "applying $conf" | ||||
| 			while read var comments; do | ||||
| 				case "$var" in | ||||
| 				""|"#"*) continue;; | ||||
| 				esac | ||||
| 				sysctl -w "$var" >/dev/null || retval=1 | ||||
| 			done < "$conf" | ||||
| 			veend $retval | ||||
| 		fi | ||||
| 	done | ||||
| 	eoutdent | ||||
| 	eend $retval "Some errors were encountered" | ||||
| } | ||||
| @@ -3,7 +3,9 @@ | ||||
|  | ||||
| # Generic definitions | ||||
|  | ||||
| SFX=		.GNU-kFreeBSD.in | ||||
| PKG_PREFIX?=	/usr | ||||
|  | ||||
| CPPFLAGS+=	-D_BSD_SOURCE -D_XOPEN_SOURCE=700 | ||||
| LIBDL=		-Wl,-Bdynamic -ldl | ||||
| LIBKVM?= | ||||
| include ${MK}/os-BSD.mk | ||||
|   | ||||
							
								
								
									
										35
									
								
								sh/init.sh.GNU-kFreeBSD.in
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										35
									
								
								sh/init.sh.GNU-kFreeBSD.in
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,35 @@ | ||||
| #!@SHELL@ | ||||
| # Copyright (c) 2007-2009 Roy Marples <roy@marples.name> | ||||
| # Released under the 2-clause BSD license. | ||||
|  | ||||
| if [ ! -d /run ]; then | ||||
|     ebegin "Creating /run" | ||||
|     mkdir -p /run | ||||
|     eend $? | ||||
| fi | ||||
|  | ||||
| if [ -L $RC_SVCDIR ]; then | ||||
|     rm $RC_SVCDIR | ||||
| fi | ||||
|  | ||||
| ebegin "Mounting /run" | ||||
| if ! fstabinfo --mount /run; then | ||||
|     mount -t tmpfs -o mode=0755,noexec,nosuid,size=10% tmpfs /run | ||||
|     if [ $? != 0 ]; then | ||||
|         eerror "Unable to mount tmpfs on /run." | ||||
|         eerror "Can't continue." | ||||
|         exit 1 | ||||
|     fi | ||||
| fi | ||||
| eend | ||||
|  | ||||
| ebegin "Creating $RC_SVCDIR" | ||||
| mkdir -p $RC_SVCDIR | ||||
| eend $? | ||||
|  | ||||
| if [ -e "$RC_LIBEXECDIR"/cache/deptree ]; then | ||||
|     cp -p "$RC_LIBEXECDIR"/cache/* "$RC_SVCDIR" 2>/dev/null | ||||
| fi | ||||
|  | ||||
| echo sysinit >"$RC_SVCDIR"/softlevel | ||||
| exit 0 | ||||
		Reference in New Issue
	
	Block a user