components/texinfo/svc-texinfo-update
changeset 599 3493d2848bde
parent 559 5ec27e888a6e
child 971 345f87d27ffb
equal deleted inserted replaced
598:398722c80922 599:3493d2848bde
    19 #
    19 #
    20 # CDDL HEADER END
    20 # CDDL HEADER END
    21 #
    21 #
    22 
    22 
    23 #
    23 #
    24 # Copyright (c) 2011, Oracle and/or its affiliates.  All rights reserved.
    24 # Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
    25 #
    25 #
    26 
    26 
    27 . /lib/svc/share/smf_include.sh
    27 . /lib/svc/share/smf_include.sh
    28 
    28 
    29 PATH=/usr/bin
    29 PATH=/usr/bin
    64 		if [[ -f ${dir_file} ]] ; then
    64 		if [[ -f ${dir_file} ]] ; then
    65 			# get owner/group from original file
    65 			# get owner/group from original file
    66 			group_bin=$(ls -l ${dir_file} | \
    66 			group_bin=$(ls -l ${dir_file} | \
    67 				    awk '{print $3":"$4}')
    67 				    awk '{print $3":"$4}')
    68 		fi
    68 		fi
    69 		mv -f ${dir_file}.new ${dir_file}
    69 		if [[ -f ${dir_file}.new ]] ; then
    70 		chmod -f 0644 ${dir_file}
    70 			# new dir file created, replace the original one
    71 		chown -f ${owner_group} ${dir_file}
    71 			mv -f ${dir_file}.new ${dir_file}
    72 		ln -s ${1} ${dir_file}.backlink 2>/dev/null
    72 			chmod -f 0644 ${dir_file}
       
    73 			chown -f ${owner_group} ${dir_file}
       
    74 			ln -s ${1} ${dir_file}.backlink 2>/dev/null
       
    75 		else
       
    76 			# no dir file created (no input files installed)
       
    77 			rm -f ${dir_file} ${dir_file}.backlink
       
    78 		fi
    73 		;;
    79 		;;
    74 	esac
    80 	esac
    75 }
    81 }
    76 
    82 
    77 ### Begin Here ###
    83 ### Begin Here ###