Changeset 14482 for trunk/base


Ignore:
Timestamp:
Oct 8, 2005, 7:21:02 PM (15 years ago)
Author:
jberry
Message:
  • Be more aggressive about creating launchd plists as root:wheel.
  • Declare UI_PREFIX before using it.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/base/src/port1.0/portstartupitem.tcl

    r14481 r14482  
    22# portstartupitem.tcl
    33#
    4 # $Id: portstartupitem.tcl,v 1.16 2005/10/08 19:01:54 jberry Exp $
     4# $Id: portstartupitem.tcl,v 1.17 2005/10/08 19:21:02 jberry Exp $
    55#
    66# Copyright (c) 2004, 2005 Markus W. Weissman <mww@opendarwin.org>,
     
    117117
    118118proc startupitem_create_darwin_systemstarter {args} {
    119         global prefix destroot destroot.keepdirs  portname os.platform
     119        global UI_PREFIX prefix destroot destroot.keepdirs  portname os.platform
    120120        global startupitem.name startupitem.requires startupitem.init
    121121        global startupitem.start startupitem.stop startupitem.restart startupitem.executable
     
    371371
    372372proc startupitem_create_darwin_launchd {args} {
    373         global prefix destroot destroot.keepdirs portname os.platform
     373        global UI_PREFIX prefix destroot destroot.keepdirs portname os.platform
    374374        global startupitem.name startupitem.requires startupitem.init
    375375        global startupitem.start startupitem.stop startupitem.restart startupitem.executable
     
    388388       
    389389        file mkdir ${destroot}${itemdir}
     390        file attributes ${destroot}${itemdir} -owner root -group wheel
    390391               
    391392        if { [llength ${startupitem.executable}] &&
     
    425426                # Create the wrapper script
    426427                set item [open "${destroot}${wrapper}" w 0755]
     428                file attributes "${destroot}${wrapper}" -owner root -group wheel
    427429
    428430                puts ${item} "#!/bin/sh"
     
    510512                }
    511513
    512                 if { ${pidfileArgCnt} != 2 } {
     514                if { ${pidfileArgCnt} > 2 } {
    513515                        ui_error "$UI_PREFIX [msgcat::mc "Invalid parameter count to startupitem.pidfile: 2 expected, %d found" ${pidfileArgCnt}]"
    514516                }
Note: See TracChangeset for help on using the changeset viewer.