Changeset 67736 in vbox for trunk/src/VBox/Installer
- Timestamp:
- Jun 30, 2017 1:43:48 PM (8 years ago)
- svn:sync-xref-src-repo-rev:
- 116590
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Installer/linux/routines.sh
r63858 r67736 125 125 description=`sed -n 's/# *Short-Description: *\(.*\)/\1/p' "${script}"` 126 126 required=`sed -n 's/# *Required-Start: *\(.*\)/\1/p' "${script}" | sed 's/\$[a-z]*//'` 127 startbefore=`sed -n 's/# *X-Start-Before: *\(.*\)/\1/p' "${script}" | sed 's/\$[a-z]*//'` 127 128 runlevels=`sed -n 's/# *Default-Start: *\(.*\)/\1/p' "${script}"` 128 before=`for i in ${runlevels}; do printf "runlevel${i}.target "; done` 129 servicetype=`sed -n 's/# *X-Service-Type: *\(.*\)/\1/p' "${script}"` 130 test -z "${servicetype}" && servicetype="forking" 131 targets=`for i in ${runlevels}; do printf "runlevel${i}.target "; done` 132 before=`for i in ${startbefore}; do printf "${i}.service "; done` 129 133 after=`for i in ${required}; do printf "${i}.service "; done` 130 134 cat > "${unit_path}/${name}.service" << EOF … … 132 136 SourcePath=${script} 133 137 Description=${description} 134 Before=${ before}shutdown.target138 Before=${targets}shutdown.target ${before} 135 139 After=${after} 136 140 Conflicts=shutdown.target 137 141 138 142 [Service] 139 Type= forking143 Type=${servicetype} 140 144 Restart=no 141 145 TimeoutSec=5min
Note:
See TracChangeset
for help on using the changeset viewer.