mirror of https://github.com/fairyglade/ly.git
				
				
				
			
		
			
				
	
	
		
			35 lines
		
	
	
		
			715 B
		
	
	
	
		
			Plaintext
		
	
	
	
			
		
		
	
	
			35 lines
		
	
	
		
			715 B
		
	
	
	
		
			Plaintext
		
	
	
	
| #!/sbin/openrc-run
 | |
| 
 | |
| name="ly"
 | |
| description="TUI Display Manager"
 | |
| 
 | |
| ## Supervisor daemon
 | |
| supervisor=supervise-daemon
 | |
| respawn_period=60
 | |
| pidfile=/run/"${RC_SVCNAME}.pid"
 | |
| 
 | |
| ## Check for getty or agetty
 | |
| if [ -x /sbin/getty ] || [ -x /bin/getty ];
 | |
| then
 | |
|     # busybox
 | |
|     commandB="/sbin/getty"
 | |
| elif [ -x /sbin/agetty ] || [ -x /bin/agetty ];
 | |
| then
 | |
|     # util-linux
 | |
|     commandUL="/sbin/agetty"
 | |
| fi
 | |
| 
 | |
| ## The execution vars
 | |
| TTY="tty$DEFAULT_TTY"
 | |
| TERM=linux
 | |
| BAUD=38400
 | |
| # If we don't have getty then we should have agetty
 | |
| command=${commandB:-$commandUL}
 | |
| command_args_foreground="-nl $PREFIX_DIRECTORY/bin/$EXECUTABLE_NAME $TTY $BAUD $TERM"
 | |
| 
 | |
| depend() {
 | |
|          after agetty
 | |
|          provide display-manager
 | |
|          want elogind
 | |
| }
 |