1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-07 06:40:06 +00:00
freebsd-ports/x11-fonts/xfs/files/xfs.in
Doug Barton 83eb2c3700 In the rc.d scripts, change assignments to rcvar to use the
literal name_enable wherever possible, and ${name}_enable
when it's not, to prepare for the demise of set_rcvar().

In cases where I had to hand-edit unusual instances also
modify formatting slightly to be more uniform (and in
some cases, correct). This includes adding some $FreeBSD$
tags, and most importantly moving rcvar= to right after
name= so it's clear that one is derived from the other.
2012-01-14 08:57:23 +00:00

38 lines
865 B
Bash

#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: xfs
# REQUIRE: cleartmp ldconfig
# BEFORE: LOGIN
# The following variables are provided to control startup of X font server in
# rc configuration file (eg /etc/rc.conf):
# xfs_enable (bool): Set to "NO" by default.
# Set it to "YES" to enable X font server
# xfs_config (str): Set to "%%PREFIX%%/etc/X11/fs/config" by default.
# Configuration file for X font server.
#
# Please see xfs(1), rc.conf(5) and rc(8) for further details.
. /etc/rc.subr
name="xfs"
rcvar=xfs_enable
# Set defaults
[ -z "$xfs_enable" ] && xfs_enable="NO"
[ -z "$xfs_config" ] && xfs_config="%%PREFIX%%/etc/X11/fs/config"
load_rc_config $name
command="%%PREFIX%%/bin/${name}"
command_args="-config ${xfs_config} -daemon ${xfs_user:+-user ${xfs_user}}"
required_files="$xfs_config"
extra_commands="reload"
unset xfs_user
run_rc_command "$1"