getmodels revision 7c478bd95313f5f23a4c958a745db2134aa03244
7f007e36bec06aba6b3a0f84a64f2abf99edfcd8gstein#!/usr/bin/ksh
8f5dca296674091bd47a7846d0cc16ce5bbc272ejerenkrantz#
2a6c49cfaef5979a5a06098f3ce987cd76769409manoj# CDDL HEADER START
2a6c49cfaef5979a5a06098f3ce987cd76769409manoj#
2a6c49cfaef5979a5a06098f3ce987cd76769409manoj# The contents of this file are subject to the terms of the
8f5dca296674091bd47a7846d0cc16ce5bbc272ejerenkrantz# Common Development and Distribution License, Version 1.0 only
91cacb801f6c0215b38322f6d2fc58cbfedfecfbjerenkrantz# (the "License"). You may not use this file except in compliance
91cacb801f6c0215b38322f6d2fc58cbfedfecfbjerenkrantz# with the License.
91cacb801f6c0215b38322f6d2fc58cbfedfecfbjerenkrantz#
df14f0d3a5191cdd7c4bb5b03acd135d43a6f51brbb# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
df14f0d3a5191cdd7c4bb5b03acd135d43a6f51brbb# or http://www.opensolaris.org/os/licensing.
ab71b233b3a36489e44a7b061c48293be0b17788jwoolley# See the License for the specific language governing permissions
571760de5e60c0b459cb11be45507b923cd023eejwoolley# and limitations under the License.
571760de5e60c0b459cb11be45507b923cd023eejwoolley#
9180a5933673ffb1af633c255ceee029340f3b1erbb# When distributing Covered Code, include this CDDL HEADER in each
bcb6e1be6041dfeb549c8ea8d37f97ad4e90a0c3rbb# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
9bd71e35f5d26d26d23fe3a677401828e842ed72wrowe# If applicable, add the following below this CDDL HEADER, with the
2900ab946a2d76b73a14cebfe2985d253f01c967stoddard# fields enclosed by brackets "[]" replaced with your own identifying
a548c09e6a8ca1b059d0e93b5256c6ccb2b3c3cdrbb# information: Portions Copyright [yyyy] [name of copyright owner]
a548c09e6a8ca1b059d0e93b5256c6ccb2b3c3cdrbb#
a548c09e6a8ca1b059d0e93b5256c6ccb2b3c3cdrbb# CDDL HEADER END
b876b7bcf0ce3d232da723246d709e8dbbfe8762rbb#
cf6bf6c34c936e6a6fe731dbce4a5c3c8bf8e9a3gstein#
35330e0d79ceb8027223bbb8330a381b1f989d6etrawick# ident "%Z%%M% %I% %E% SMI"
6f6f4a4bca281779d196acbdd5c017bb90858305trawick#
8dd4618c4709236b4ea297d7250d282e463ce2d8rbb# Copyright 2004 Sun Microsystems, Inc. All rights reserved.
09bd86d0db1114ee23eda0a6eb76ca055877a1cftrawick# Use is subject to license terms.
2deb319e6b3de239f45c16a3e9e836d44f1f7108rbb#
bd929c73ef04789b7183b840d8db6e01d03a4d86rbb
70f6f32765cfaadd6da8de6f0fea97ddd72d8fadmanoj#
2a6c49cfaef5979a5a06098f3ce987cd76769409manoj# get a list of the Models for this Model from the ppdcache
af4c982a7cf4515f124935f99a329744035fc699slive#
af4c982a7cf4515f124935f99a329744035fc699slive
af4c982a7cf4515f124935f99a329744035fc699sliveif [[ $# -lt 1 ]]; then
af4c982a7cf4515f124935f99a329744035fc699slive exit 1
af4c982a7cf4515f124935f99a329744035fc699slivefi
af4c982a7cf4515f124935f99a329744035fc699slive
af4c982a7cf4515f124935f99a329744035fc699sliveif [[ -f /usr/lib/lp/model/ppd/ppdcache ]]; then
2a6c49cfaef5979a5a06098f3ce987cd76769409manoj /bin/grep ^$1 /usr/lib/lp/model/ppd/ppdcache | nawk '{FS=":"; print $2}' | uniq
531c23ff01a2489646f0a2029097013b328d935agstein exit 0
7fe18c15b669db9d191859695901dc4fcf3829dawroweelse
7fe18c15b669db9d191859695901dc4fcf3829dawrowe exit 1
7fe18c15b669db9d191859695901dc4fcf3829dawrowefi
b84f66c93f820824b1d5455181f55598b766319cwrowe