Thu, 02 Aug 2012 00:16:26 +0200
Change smf(5) OpenPKG name handle to my personal preference, the prefix.
This matches the ${name} variable on uninstallation, but strangely when
installing an instance a bug causes ${name} to expand to openpkg-${prefix}.
openpkg/openpkg.spec | file | annotate | diff | comparison | revisions |
1.1 --- a/openpkg/openpkg.spec Thu Aug 02 00:03:59 2012 +0200 1.2 +++ b/openpkg/openpkg.spec Thu Aug 02 00:16:26 2012 +0200 1.3 @@ -2698,13 +2698,13 @@ 1.4 if [ ! -d /var/svc/manifest/openpkg ]; then 1.5 mkdir /var/svc/manifest/openpkg 1.6 fi 1.7 - if [ ! -f /var/svc/manifest/openpkg/${name}.xml ]; then 1.8 + if [ ! -f /var/svc/manifest/openpkg/${prefix}.xml ]; then 1.9 # install SMF manifest 1.10 ( echo "<?xml version=\"1.0\"?>" 1.11 echo "<!DOCTYPE service_bundle SYSTEM \"/usr/share/lib/xml/dtd/service_bundle.dtd.1\">" 1.12 - echo "<service_bundle type='manifest' name='OpenPKG:${name}'>" 1.13 + echo "<service_bundle type='manifest' name='OpenPKG:${prefix}'>" 1.14 echo " <service" 1.15 - echo " name='openpkg/${name}'" 1.16 + echo " name='openpkg/${prefix}'" 1.17 echo " type='service'" 1.18 echo " version='1'>" 1.19 echo " <single_instance />" 1.20 @@ -2767,7 +2767,7 @@ 1.21 echo " <propval" 1.22 echo " name='action_authorization'" 1.23 echo " type='astring'" 1.24 - echo " value='solaris.smf.manage.openpkg.${name}' />" 1.25 + echo " value='solaris.smf.manage.openpkg.${prefix}' />" 1.26 echo " </property_group>" 1.27 echo " <instance name='default' enabled='false' />" 1.28 echo " <stability value='Unstable' />" 1.29 @@ -2778,10 +2778,10 @@ 1.30 echo " </template>" 1.31 echo " </service>" 1.32 echo "</service_bundle>" 1.33 - ) >/var/svc/manifest/openpkg/${name}.xml 1.34 - chmod 644 /var/svc/manifest/openpkg/${name}.xml 1.35 - /usr/sbin/svccfg import /var/svc/manifest/openpkg/${name}.xml 1.36 - ( echo "/usr/sbin/svcadm enable \"svc:/openpkg/${name}:default\"" 1.37 + ) >/var/svc/manifest/openpkg/${prefix}.xml 1.38 + chmod 644 /var/svc/manifest/openpkg/${prefix}.xml 1.39 + /usr/sbin/svccfg import /var/svc/manifest/openpkg/${prefix}.xml 1.40 + ( echo "/usr/sbin/svcadm enable \"svc:/openpkg/${prefix}:default\"" 1.41 ) >%{l_prefix}.pre-post-process.sh 1.42 fi 1.43 ;; 1.44 @@ -3586,9 +3586,9 @@ 1.45 fi 1.46 ;; 1.47 SunOS/5.1* ) 1.48 - /usr/sbin/svcadm disable "svc:/openpkg/${name}:default"; sleep 2 1.49 - /usr/sbin/svccfg delete -f "svc:/openpkg/${name}:default" >/dev/null 2>&1 || true 1.50 - rm -f /var/svc/manifest/openpkg/${name}.xml >/dev/null 2>&1 1.51 + /usr/sbin/svcadm disable "svc:/openpkg/${prefix}:default"; sleep 2 1.52 + /usr/sbin/svccfg delete -f "svc:/openpkg/${prefix}:default" >/dev/null 2>&1 || true 1.53 + rm -f /var/svc/manifest/openpkg/${prefix}.xml >/dev/null 2>&1 1.54 rmdir /var/svc/manifest/openpkg >/dev/null 2>&1 || true 1.55 ;; 1.56 SunOS/5.* )