3 ms·
For those who like to count lines, that's typically a whopping 9 line script, because it usually looks like: #!/bin/sh # # $OpenBSD: xdm,v 1.1 2011
by tedunangst 11y ago
For those who like to count lines, that's typically a whopping 9 line script, because it usually looks like:
#!/bin/sh
#
# $OpenBSD: xdm,v 1.1 2011/07/07 18:42:17 robert Exp $
daemon="/usr/X11R6/bin/xdm"
. /etc/rc.d/rc.subr
rc_cmd $1
- protomyth 11y agofor completeness' sake, here is the longest startup script on my OpenBSD system: #!/bin/sh # # $OpenBSD: nsd,v 1.9 2014/12/29 11:17:05 ajacoutot Exp $ daemon="/usr/sbin/nsd-control" daemon_flags="-c /var/nsd/etc/nsd.conf" . /etc/rc.d/rc.subr rc_usercheck=NO rc_pre() { if ! [[ -f /var/nsd/etc/nsd_server.key || -f /var/nsd/etc/nsd_server.pem || -f /var/nsd/etc/nsd_control.key || -f /var/nsd/etc/nsd_control.pem ]]; then /usr/sbin/nsd-control-setup >/dev/null 2>&1 fi } rc_start() { ${rcexec} "${daemon} ${daemon_flags} start" } rc_check() { ${daemon} ${daemon_flags} status || return 1 } rc_reload() { ${daemon} ${daemon_flags} reconfig && ${daemon} ${daemon_flags} reload } rc_stop() { ${daemon} ${daemon_flags} stop } rc_cmd $1 37 lines of code (postgresql's weighs in at 33)