| 159 | |
| 160 | # Check for startup items in etc/rc.d (${destroot}${prefix}/etc/rc.d) |
| 161 | if {[file exists ${destroot}${prefix}/etc/rc.d]} { |
| 162 | if {[file isdirectory ${destroot}${prefix}/etc/rc.d]} { |
| 163 | foreach fileIdentifier [glob -dir ${destroot}${prefix}/etc/rc.d *.sh] { |
| 164 | # Create entry of form DAEMON=-NO- (from etc/rc.d/daemon.sh) |
| 165 | set fileName [file tail ${fileIdentifier}] |
| 166 | regexp -nocase {(.*)\.sh} $fileName $fileName startupItem |
| 167 | set daemonName [string toupper ${startupItem}] |
| 168 | set hostconfigEntry [concat ${daemonName}=-NO-] |
| 169 | # Only write entry if not already present |
| 170 | system "if ! grep -q ${daemonName}= ${prefix}/etc/hostconfig; then \ |
| 171 | echo ${hostconfigEntry} >> ${prefix}/etc/hostconfig; fi" |
| 172 | } |
| 173 | } |
| 174 | } |