Changeset 88632 in vbox for trunk/src/VBox/ValidationKit/testboxscript/solaris
- Timestamp:
- Apr 21, 2021 12:27:22 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/testboxscript/solaris/setup-routines.sh
r82968 r88632 54 54 # Solaris variables. 55 55 # 56 MY_SVC_TMP="/tmp/testboxscript.xml"57 56 MY_SVC_FMRI="svc:/system/virtualbox/testboxscript" 58 57 MY_SVCCFG="/usr/sbin/svccfg" 59 58 MY_SVCADM="/usr/sbin/svcadm" 59 MY_CHGRP="/usr/bin/chgrp" 60 60 MY_TR="/usr/bin/tr" 61 61 MY_TAB=`printf "\t"` 62 63 if test "${MY_SOLARIS_VER}" -lt 11; then 64 # solaris 10 service import 65 MY_SVC="/tmp/testboxscript.xml" 66 else 67 # use propper manifest directory 68 # /lib/svc/manifest/system for solaris 11 and higher for testboxscript.xml file 69 70 # Since sol 11.4 the solaris testboxscript service 71 # generates Warnings in /var/svc/log/system-manifest-import:default.log 72 # -------- Warning!! 73 # Configuring services... 74 # * Warning!! Importing Zone access service ...FAILED. 75 76 MY_SVC="/lib/svc/manifest/system/testboxscript.xml" 77 fi 62 78 if test "${MY_SOLARIS_VER}" -lt 11; then ## No gsed on S10?? ARG! 63 79 MY_SED="/usr/xpg4/bin/sed" … … 202 218 203 219 # Create the service xml config file. 204 cat > "${MY_SVC _TMP}" <<EOF220 cat > "${MY_SVC}" <<EOF 205 221 <?xml version='1.0'?> 206 222 <!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1"> … … 233 249 EOF 234 250 if [ "`uname -r`" = "5.10" ]; then # Seems to be gone in S11? 235 cat >> "${MY_SVC _TMP}" <<EOF251 cat >> "${MY_SVC}" <<EOF 236 252 <dependency name='filesystem-volfs' grouping='require_all' restart_on='none' type='service'> 237 253 <service_fmri value='svc:/system/filesystem/volfs:default' /> … … 239 255 EOF 240 256 fi 241 cat >> "${MY_SVC _TMP}" <<EOF257 cat >> "${MY_SVC}" <<EOF 242 258 <!-- start + stop methods --> 243 259 <exec_method type='method' name='start' exec='${MY_SCREEN} -S testboxscript -d -m ${MY_ARGV}' … … 268 284 EOF 269 285 270 # Install the service, replacing old stuff. 271 if "${MY_SVCCFG}" "export" "${MY_SVC_FMRI}" > /dev/null 2>&1; then 286 if test "${MY_SOLARIS_VER}" -lt 11; then 287 # Install the service, replacing old stuff. 288 if "${MY_SVCCFG}" "export" "${MY_SVC_FMRI}" > /dev/null 2>&1; then 272 289 "${MY_SVCCFG}" "delete" "${MY_SVC_FMRI}" 273 fi 274 "${MY_SVCCFG}" "import" "${MY_SVC_TMP}" 275 rm -f "${MY_SVC_TMP}" 290 fi 291 "${MY_SVCCFG}" "import" "${MY_SVC}" 292 293 # only for solaris version less than 11 294 rm -f "${MY_SVC}" 295 else 296 "${MY_CHGRP}" "sys" "${MY_SVC}" 297 "${MY_SVCADM}" "restart" "manifest-import" 298 299 # Do not remove the xml file in Solaris versions 11 and higher. 300 # The service will be removed automatically, if the command 301 # svcadm restart manifest-import 302 # will be executed 303 304 fi 276 305 return 0; 277 306 }
Note:
See TracChangeset
for help on using the changeset viewer.