packages/common_files/proc.fc_rebuild
author Alan Coopersmith <Alan.Coopersmith@Sun.COM>
Tue, 02 Mar 2010 13:31:46 -0800
changeset 919 425233ae7236
parent 907 3c35d611cdaa
child 943 294f64612d23
permissions -rw-r--r--
6931307 Standardize Sun copyright & license notices in X gate on current format
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
340
08d9036bb8c8 6667480 force_rebuild property for fc-cache SMF service [PSARC 2008/106]
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
     1
#!/bin/ksh
08d9036bb8c8 6667480 force_rebuild property for fc-cache SMF service [PSARC 2008/106]
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
     2
#
08d9036bb8c8 6667480 force_rebuild property for fc-cache SMF service [PSARC 2008/106]
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
     3
# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
08d9036bb8c8 6667480 force_rebuild property for fc-cache SMF service [PSARC 2008/106]
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
     4
# Use is subject to license terms.
08d9036bb8c8 6667480 force_rebuild property for fc-cache SMF service [PSARC 2008/106]
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
     5
#
08d9036bb8c8 6667480 force_rebuild property for fc-cache SMF service [PSARC 2008/106]
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
     6
# Permission is hereby granted, free of charge, to any person obtaining a
919
425233ae7236 6931307 Standardize Sun copyright & license notices in X gate on current format
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 907
diff changeset
     7
# copy of this software and associated documentation files (the "Software"),
425233ae7236 6931307 Standardize Sun copyright & license notices in X gate on current format
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 907
diff changeset
     8
# to deal in the Software without restriction, including without limitation
425233ae7236 6931307 Standardize Sun copyright & license notices in X gate on current format
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 907
diff changeset
     9
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
425233ae7236 6931307 Standardize Sun copyright & license notices in X gate on current format
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 907
diff changeset
    10
# and/or sell copies of the Software, and to permit persons to whom the
425233ae7236 6931307 Standardize Sun copyright & license notices in X gate on current format
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 907
diff changeset
    11
# Software is furnished to do so, subject to the following conditions:
340
08d9036bb8c8 6667480 force_rebuild property for fc-cache SMF service [PSARC 2008/106]
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    12
#
919
425233ae7236 6931307 Standardize Sun copyright & license notices in X gate on current format
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 907
diff changeset
    13
# The above copyright notice and this permission notice (including the next
425233ae7236 6931307 Standardize Sun copyright & license notices in X gate on current format
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 907
diff changeset
    14
# paragraph) shall be included in all copies or substantial portions of the
425233ae7236 6931307 Standardize Sun copyright & license notices in X gate on current format
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 907
diff changeset
    15
# Software.
340
08d9036bb8c8 6667480 force_rebuild property for fc-cache SMF service [PSARC 2008/106]
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    16
#
919
425233ae7236 6931307 Standardize Sun copyright & license notices in X gate on current format
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 907
diff changeset
    17
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
425233ae7236 6931307 Standardize Sun copyright & license notices in X gate on current format
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 907
diff changeset
    18
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
425233ae7236 6931307 Standardize Sun copyright & license notices in X gate on current format
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 907
diff changeset
    19
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
425233ae7236 6931307 Standardize Sun copyright & license notices in X gate on current format
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 907
diff changeset
    20
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
425233ae7236 6931307 Standardize Sun copyright & license notices in X gate on current format
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 907
diff changeset
    21
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
425233ae7236 6931307 Standardize Sun copyright & license notices in X gate on current format
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 907
diff changeset
    22
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
425233ae7236 6931307 Standardize Sun copyright & license notices in X gate on current format
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 907
diff changeset
    23
# DEALINGS IN THE SOFTWARE.
340
08d9036bb8c8 6667480 force_rebuild property for fc-cache SMF service [PSARC 2008/106]
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    24
#
08d9036bb8c8 6667480 force_rebuild property for fc-cache SMF service [PSARC 2008/106]
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    25
###########################################################################
08d9036bb8c8 6667480 force_rebuild property for fc-cache SMF service [PSARC 2008/106]
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    26
#
08d9036bb8c8 6667480 force_rebuild property for fc-cache SMF service [PSARC 2008/106]
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    27
#
08d9036bb8c8 6667480 force_rebuild property for fc-cache SMF service [PSARC 2008/106]
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    28
08d9036bb8c8 6667480 force_rebuild property for fc-cache SMF service [PSARC 2008/106]
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    29
# Force fontconfig cache rebuild on next boot
490
763d0961a878 6696405 Problem with CAS of SUNWi1of/SUNWxwfnt/SUNWxwcft/SUNWxwoft in diskless server in snv_88
Kim Tran <Kim.C.Tran@Sun.COM>
parents: 340
diff changeset
    30
DISKLESS_SRVC=`echo $BASEDIR | /usr/bin/grep export/Solaris_[1-9][0-9]/usr_${ARCH}.all`
763d0961a878 6696405 Problem with CAS of SUNWi1of/SUNWxwfnt/SUNWxwcft/SUNWxwoft in diskless server in snv_88
Kim Tran <Kim.C.Tran@Sun.COM>
parents: 340
diff changeset
    31
if [  "$DISKLESS_SRVC" ]; then
763d0961a878 6696405 Problem with CAS of SUNWi1of/SUNWxwfnt/SUNWxwcft/SUNWxwoft in diskless server in snv_88
Kim Tran <Kim.C.Tran@Sun.COM>
parents: 340
diff changeset
    32
	exit 0
763d0961a878 6696405 Problem with CAS of SUNWi1of/SUNWxwfnt/SUNWxwcft/SUNWxwoft in diskless server in snv_88
Kim Tran <Kim.C.Tran@Sun.COM>
parents: 340
diff changeset
    33
else
529
739af6c3ef5a 6743833 more problems with SUNWi1of/SUNWxwfnt/SUNWxwcft/SUNWxwoft packaging
Kim Tran <Kim.C.Tran@Sun.COM>
parents: 502
diff changeset
    34
	grep force_rebuild  $BASEDIR/../var/svc/profile/upgrade > /dev/null 2>&1
490
763d0961a878 6696405 Problem with CAS of SUNWi1of/SUNWxwfnt/SUNWxwcft/SUNWxwoft in diskless server in snv_88
Kim Tran <Kim.C.Tran@Sun.COM>
parents: 340
diff changeset
    35
	if [ $? -ne 0 ]; then
763d0961a878 6696405 Problem with CAS of SUNWi1of/SUNWxwfnt/SUNWxwcft/SUNWxwoft in diskless server in snv_88
Kim Tran <Kim.C.Tran@Sun.COM>
parents: 340
diff changeset
    36
		cat >> $BASEDIR/../var/svc/profile/upgrade <<\_EOF
763d0961a878 6696405 Problem with CAS of SUNWi1of/SUNWxwfnt/SUNWxwcft/SUNWxwoft in diskless server in snv_88
Kim Tran <Kim.C.Tran@Sun.COM>
parents: 340
diff changeset
    37
        	/usr/sbin/svccfg -s application/font/fc-cache setprop options/force_rebuild=true
502
e2c5ce124948 6696405 Problem with CAS of SUNWi1of/SUNWxwfnt/SUNWxwcft/SUNWxwoft (fix indent)
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 490
diff changeset
    38
_EOF
490
763d0961a878 6696405 Problem with CAS of SUNWi1of/SUNWxwfnt/SUNWxwcft/SUNWxwoft in diskless server in snv_88
Kim Tran <Kim.C.Tran@Sun.COM>
parents: 340
diff changeset
    39
	fi
763d0961a878 6696405 Problem with CAS of SUNWi1of/SUNWxwfnt/SUNWxwcft/SUNWxwoft in diskless server in snv_88
Kim Tran <Kim.C.Tran@Sun.COM>
parents: 340
diff changeset
    40
fi
340
08d9036bb8c8 6667480 force_rebuild property for fc-cache SMF service [PSARC 2008/106]
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    41