2022-12-10 18:42:02 -05:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#!/bin/sh
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								# PROVIDE: poudboot
							 | 
						
					
						
							
								
									
										
										
										
											2023-07-14 10:06:40 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								# REQUIRE: FILESYSTEM kld
							 | 
						
					
						
							
								
									
										
										
										
											2022-12-10 18:42:02 -05:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								# AFTER: netif
							 | 
						
					
						
							
								
									
										
										
										
											2023-07-14 10:06:40 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								# KEYWORD: shutdown
							 | 
						
					
						
							
								
									
										
										
										
											2022-12-10 18:42:02 -05:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								. /etc/rc.subr
							 | 
						
					
						
							
								
									
										
										
										
											2023-07-14 10:06:40 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2022-12-10 18:42:02 -05:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								name=poudboot
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								rcvar=${name}_enable
							 | 
						
					
						
							
								
									
										
										
										
											2023-07-14 10:06:40 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								desc="Poudriere Loop"
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2022-12-10 18:42:02 -05:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								load_rc_config $name
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2024-02-11 14:59:55 -05:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								: ${poudboot_enable:=NO}
							 | 
						
					
						
							
								
									
										
										
										
											2023-07-14 10:06:40 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								command=/usr/sbin/daemon
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								pidfile=/var/run/${name}.pid
							 | 
						
					
						
							
								
									
										
										
										
											2022-12-10 18:42:02 -05:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2024-05-05 12:08:01 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								command_args="-p $pidfile -u root -f -S -T $name nice -n 10 lockf -t 0 /var/run/$name.lock /root/.cargo/bin/poudboot /opt/poudriere/poudboot.sqlite3"
							 | 
						
					
						
							
								
									
										
										
										
											2022-12-10 18:42:02 -05:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-07-14 11:18:38 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								export PATH="${PATH}:/usr/local/bin"
							 | 
						
					
						
							
								
									
										
										
										
											2022-12-10 18:42:02 -05:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								run_rc_command "$1"
							 |