7092164 application/texinfo-update's start method needs improvement
authorNorm Jacobs <Norm.Jacobs@Oracle.COM>
Fri, 14 Oct 2011 15:51:54 -0700
changeset 536 cc30c1136ebb
parent 535 5fca86890b48
child 537 10bd3a98a582
7092164 application/texinfo-update's start method needs improvement 7099092 text/texinfo fails pkg verify check
components/texinfo/svc-texinfo-update
components/texinfo/texinfo-update.xml
--- a/components/texinfo/svc-texinfo-update	Fri Oct 14 10:06:55 2011 -0700
+++ b/components/texinfo/svc-texinfo-update	Fri Oct 14 15:51:54 2011 -0700
@@ -43,7 +43,15 @@
 			/usr/bin/install-info --dir-file=${dir_file}.new \
 				--info-file=${info_file}
 		done
+		owner_group='root:bin'	# default owner/group
+		if [[ -f ${dir_file} ]] ; then
+			# get owner/group from original file
+			group_bin=$(/bin/ls -l ${dir_file} | \
+				    awk '{print $3":"$4}')
+		fi
 		/bin/mv -f ${dir_file}.new ${dir_file}
+		/bin/chmod -f 0644 ${dir_file}
+		/bin/chown -f ${owner_group} ${dir_file}
 		/bin/ln -s ${1} ${dir_file}.backlink 2>/dev/null
 		;;
 	esac
--- a/components/texinfo/texinfo-update.xml	Fri Oct 14 10:06:55 2011 -0700
+++ b/components/texinfo/texinfo-update.xml	Fri Oct 14 15:51:54 2011 -0700
@@ -46,7 +46,7 @@
 		grouping='require_all'
 		restart_on='none'
 		type='service'>
-		<service_fmri value='svc:/system/filesystem/minimal' />
+		<service_fmri value='svc:/milestone/multi-user-server' />
 	</dependency>
 
 	<exec_method