[Apcupsd-commits] apcupsd/platforms/darwin ApcupsdDaemon.Description.plist, 1.1, 1.2 ApcupsdDaemon
Brought to you by:
adk0212
Update of /cvsroot/apcupsd/apcupsd/platforms/darwin In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv21654/platforms/darwin Modified Files: Makefile.in apccontrol.in Added Files: ApcupsdDaemon.Description.plist ApcupsdDaemon.Info.plist.in ApcupsdDaemon.postflight ApcupsdDaemon.preflight ApcupsdPkg.Description.plist ApcupsdPkg.Info.plist.in ApcupsdUsbShim.Description.plist ApcupsdUsbShim.Info.plist.in ApcupsdUsbShim.postflight Welcome.txt Log Message: Merge 3.14.1-3.14.2+ changes from Branch-3_14. --- NEW FILE: ApcupsdUsbShim.Description.plist --- <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>IFPkgDescriptionDescription</key> <string>A small "shim" that prevents Apple's UPS monitor from grabbing APC USB devices. This package is REQUIRED for Apcupsd to control USB UPSes, but can be left out if your UPS is connected by another means, such as SNMP.</string> <key>IFPkgDescriptionTitle</key> <string>Apcupsd USB Shim</string> </dict> </plist> --- NEW FILE: ApcupsdUsbShim.postflight --- #!/bin/sh # Ensure kext cache is rebuild touch /System/Library/Extensions Index: Makefile.in =================================================================== RCS file: /cvsroot/apcupsd/apcupsd/platforms/darwin/Makefile.in,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- Makefile.in 28 Jul 2006 00:19:41 -0000 1.6 +++ Makefile.in 30 Sep 2007 19:49:42 -0000 1.7 @@ -12,6 +12,10 @@ # Include the default make targets: to be put before the all-targets: rule. @TARGETS@ +# PackageMaker variables +PACKAGEMAKER=/Developer/Tools/packagemaker +PKGROOT=/tmp/apcupsd-pkg + all-targets: Makefile install: install-exec install-@USB_DRIVER@ @@ -23,6 +27,9 @@ @$(SHELL) $(MKINSTALLDIRS) $(DESTDIR)/Library/StartupItems/apcupsd $(INSTALL_SCRIPT) ./apcupsd $(DESTDIR)/Library/StartupItems/apcupsd; $(INSTALL_DATA) ./StartupParameters.plist $(DESTDIR)/Library/StartupItems/apcupsd; + chown root:wheel $(DESTDIR)/Library/StartupItems/apcupsd + chown root:wheel $(DESTDIR)/Library/StartupItems/apcupsd/apcupsd + chown root:wheel $(DESTDIR)/Library/StartupItems/apcupsd/StartupParameters.plist @echo "=================================================" @echo " " @echo "apcupsd script installation for MacOS X (Darwin) complete." @@ -77,6 +84,29 @@ @echo " " @echo "=================================================" +apcupsd.pkg: + rm -rf $(PKGROOT) + mkdir $(PKGROOT) + mkdir $(PKGROOT)/ApcupsdDaemon.Root + mkdir $(PKGROOT)/ApcupsdUsbShim.Root + mkdir $(PKGROOT)/ApcupsdDaemon.Resources + mkdir $(PKGROOT)/ApcupsdUsbShim.Resources + mkdir $(PKGROOT)/ApcupsdPkg.Resources + mkdir $(PKGROOT)/Packages + mkdir $(PKGROOT)/Apcupsd + ( cd $(topdir) && DESTDIR=$(PKGROOT)/ApcupsdDaemon.Root make install ) + mv $(PKGROOT)/ApcupsdDaemon.Root/System $(PKGROOT)/ApcupsdUsbShim.Root + cp $(topdir)/ReleaseNotes $(PKGROOT)/ApcupsdPkg.Resources/ReadMe.txt + cp $(topdir)/COPYING $(PKGROOT)/ApcupsdPkg.Resources/License.txt + cp Welcome.txt $(PKGROOT)/ApcupsdPkg.Resources + cp ApcupsdDaemon.preflight $(PKGROOT)/ApcupsdDaemon.Resources/preflight + cp ApcupsdDaemon.postflight $(PKGROOT)/ApcupsdDaemon.Resources/postflight + cp ApcupsdUsbShim.postflight $(PKGROOT)/ApcupsdUsbShim.Resources/postflight + $(PACKAGEMAKER) -build -v -p $(PKGROOT)/Packages/ApcupsdDaemon.pkg -f $(PKGROOT)/ApcupsdDaemon.Root -r $(PKGROOT)/ApcupsdDaemon.Resources -i ApcupsdDaemon.Info.plist -d ApcupsdDaemon.Description.plist + $(PACKAGEMAKER) -build -v -p $(PKGROOT)/Packages/ApcupsdUsbShim.pkg -f $(PKGROOT)/ApcupsdUsbShim.Root -r $(PKGROOT)/ApcupsdUsbShim.Resources -i ApcupsdUsbShim.Info.plist -d ApcupsdUsbShim.Description.plist + $(PACKAGEMAKER) -build -v -p $(PKGROOT)/Apcupsd/Apcupsd-$(VERSION).pkg -mi $(PKGROOT)/Packages -r $(PKGROOT)/ApcupsdPkg.Resources -i ApcupsdPkg.Info.plist -d ApcupsdPkg.Description.plist + hdiutil create -ov -srcfolder $(PKGROOT)/Apcupsd -volname Apcupsd-$(VERSION) Apcupsd-$(VERSION).dmg + clean: distclean: --- NEW FILE: Welcome.txt --- Welcome to the Apcupsd installer. You will be guided through the steps necessary to install this software. If you are installing for the first time, at the end of the install procedure an editor will be opened with the apcupsd configuration file, apcupsd.conf. Please edit the file as described in the apcupsd manual (http://www.apcupsd.org/manual) and save your changes before rebooting. If you are upgrading from an existing installation, your apcupsd.conf file will be preserved and a new default file will be provided as apcupsd.conf.new. In most cases you can continue to use your existing configuration file unmodified, but please check the release notes and/or compare against apcupsd.conf.new to catch any required changes. If you encounter any problems with the installation or operation of Apcupsd, please join the apcupsd-users mailing list (http://www.apcupsd.org/lists.html) and post any questions there. --- NEW FILE: ApcupsdUsbShim.Info.plist.in --- <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>CFBundleGetInfoString</key> <string>@VERSION@, www.apcupsd.org</string> <key>CFBundleIdentifier</key> <string>org.apcupsd.usbshim</string> <key>CFBundleShortVersionString</key> <string>@VERSION@</string> <key>IFPkgFlagAllowBackRev</key> <true/> <key>IFPkgFlagAuthorizationAction</key> <string>AdminAuthorization</string> <key>IFPkgFlagBackgroundAlignment</key> <string>topleft</string> <key>IFPkgFlagBackgroundScaling</key> <string>none</string> <key>IFPkgFlagDefaultLocation</key> <string>/</string> <key>IFPkgFlagFollowLinks</key> <true/> <key>IFPkgFlagInstallFat</key> <false/> <key>IFPkgFlagInstalledSize</key> <integer>4</integer> <key>IFPkgFlagIsRequired</key> <false/> <key>IFPkgFlagOverwritePermissions</key> <false/> <key>IFPkgFlagRelocatable</key> <false/> <key>IFPkgFlagRestartAction</key> <string>RequiredRestart</string> <key>IFPkgFlagRootVolumeOnly</key> <true/> <key>IFPkgFlagUpdateInstalledLanguages</key> <false/> <key>IFPkgFormatVersion</key> <real>0.10000000149011612</real> </dict> </plist> --- NEW FILE: ApcupsdDaemon.Info.plist.in --- <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>CFBundleGetInfoString</key> <string>@VERSION@, www.apcupsd.org</string> <key>CFBundleIdentifier</key> <string>org.apcupsd.daemon</string> <key>CFBundleShortVersionString</key> <string>@VERSION@</string> <key>IFPkgFlagAllowBackRev</key> <true/> <key>IFPkgFlagAuthorizationAction</key> <string>AdminAuthorization</string> <key>IFPkgFlagBackgroundAlignment</key> <string>topleft</string> <key>IFPkgFlagBackgroundScaling</key> <string>none</string> <key>IFPkgFlagDefaultLocation</key> <string>/</string> <key>IFPkgFlagFollowLinks</key> <true/> <key>IFPkgFlagInstallFat</key> <false/> <key>IFPkgFlagInstalledSize</key> <integer>2240</integer> <key>IFPkgFlagIsRequired</key> <false/> <key>IFPkgFlagOverwritePermissions</key> <false/> <key>IFPkgFlagRelocatable</key> <false/> <key>IFPkgFlagRestartAction</key> <string>RecommendedRestart</string> <key>IFPkgFlagRootVolumeOnly</key> <true/> <key>IFPkgFlagUpdateInstalledLanguages</key> <false/> <key>IFPkgFormatVersion</key> <real>0.10000000149011612</real> </dict> </plist> --- NEW FILE: ApcupsdPkg.Description.plist --- <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>IFPkgDescriptionDescription</key> <string>Apcupsd is used for power mangement and controlling APC's UPS models on Unix and Windows platforms. Apcupsd works with most of APC's Smart-UPS models as well as most simple signalling models such a Back-UPS, and BackUPS-Office. During a power failure, apcupsd will inform the users about the power failure and that a shutdown may occur. If power is not restored, a system shutdown will follow when the battery is exhausted, a timeout (seconds) expires, or runtime expires based on internal APC calculations determined by power consumption rates. Apcupsd is licensed under the GPL version 2.</string> <key>IFPkgDescriptionTitle</key> <string>Apcupsd</string> </dict> </plist> --- NEW FILE: ApcupsdDaemon.preflight --- #!/bin/sh if [ -f /etc/apcupsd/apcupsd.conf ] ; then cp -p /etc/apcupsd/apcupsd.conf /etc/apcupsd/apcupsd.conf.SAVE fi --- NEW FILE: ApcupsdDaemon.postflight --- #!/bin/sh if [ -f /etc/apcupsd/apcupsd.conf.SAVE ] ; then # Appears to be an upgrade, so move user's original apcupsd.conf # back into place and save new one as apcupsd.conf.new. mv /etc/apcupsd/apcupsd.conf /etc/apcupsd/apcupsd.conf.new mv /etc/apcupsd/apcupsd.conf.SAVE /etc/apcupsd/apcupsd.conf else # Looks like a new install, so open apcupsd.conf in an editor # along with a message describing what to do. open -t /etc/apcupsd/apcupsd.conf echo "Please edit apcupsd.conf as appropriate for your UPS and save it before rebooting." > /tmp/inst.txt open -t /tmp/inst.txt fi Index: apccontrol.in =================================================================== RCS file: /cvsroot/apcupsd/apcupsd/platforms/darwin/apccontrol.in,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- apccontrol.in 9 Dec 2006 18:33:53 -0000 1.3 +++ apccontrol.in 30 Sep 2007 19:49:42 -0000 1.4 @@ -83,15 +83,14 @@ # in that order. # powerout) - echo "Power loss detected on UPS ${2}" | ${WALL} ;; onbattery) echo "Power failure on UPS ${2}. Running on batteries." | ${WALL} ;; offbattery) + echo "Power has returned on UPS ${2}..." | ${WALL} ;; mainsback) - echo "Power has returned on UPS ${2}..." | ${WALL} if [ -f @PWRFAILDIR@/powerfail ] ; then printf "Continuing with shutdown." | ${WALL} fi @@ -128,17 +127,6 @@ remotedown) echo "Remote Shutdown. Beginning Shutdown Sequence." | ${WALL} ;; - restartme) - echo -n "Restarting APCUPSD Power Management: " - THEPID=`cat ${APCPID}` - kill ${THEPID} - rm -f ${APCPID} - rm -f @PWRFAILDIR@/powerfail - rm -f @nologdir@/nologin - sleep 5 - `${APCUPSD}` - echo "apcupsd" - ;; startselftest) ;; endselftest) --- NEW FILE: ApcupsdPkg.Info.plist.in --- <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>IFPkgFlagBackgroundAlignment</key> <string>topleft</string> <key>IFPkgFlagBackgroundScaling</key> <string>none</string> <key>IFPkgFlagComponentDirectory</key> <string>./Contents/Packages</string> <key>IFPkgFlagPackageList</key> <array> <dict> <key>IFPkgFlagPackageLocation</key> <string>ApcupsdDaemon.pkg</string> <key>IFPkgFlagPackageSelection</key> <string>selected</string> </dict> <dict> <key>IFPkgFlagPackageLocation</key> <string>ApcupsdUsbShim.pkg</string> <key>IFPkgFlagPackageSelection</key> <string>selected</string> </dict> </array> <key>IFPkgFormatVersion</key> <real>0.10000000149011612</real> </dict> </plist> --- NEW FILE: ApcupsdDaemon.Description.plist --- <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>IFPkgDescriptionDescription</key> <string>The base apcupsd package containing the daemon itself plus associated tools and scripts</string> <key>IFPkgDescriptionTitle</key> <string>Apcupsd Daemon and Tools</string> </dict> </plist> |