#!/bin/sh . /etc/control.d/functions CONFIG_NAME=gs_init.ps CONFIG=`ls /usr/share/ghostscript/*/lib/$CONFIG_NAME | tail -1` || { echo_error "Cannot find $CONFIG_NAME config file" exit 1 } new_subst a4 \ '^[/]DEFAULTPAPERSIZE[[:space:]]+[(]a4[)][[:space:]]+def$' \ 's@^[%[:space:]]*/DEFAULTPAPERSIZE[[:space:]].*@/DEFAULTPAPERSIZE (a4) def@' new_subst undefined \ '^%[[:space:]]*[/]DEFAULTPAPERSIZE[[:space:]].*' \ 's@^[%[:space:]]*/DEFAULTPAPERSIZE[[:space:]].*@% /DEFAULTPAPERSIZE (a4) def@' new_summary "Default paper size for GhostScript" new_help a4 "Set default GhostScript paper size to A4" new_help undefined "Set default GhostScript paper size to undefuled (vendor default)" control_subst "$CONFIG" "$*" || exit 1