Re: Payload free packages Printer script
Re: Payload free packages Printer script
- Subject: Re: Payload free packages Printer script
- From: Bryan Lee <email@hidden>
- Date: Tue, 30 Jun 2009 11:29:15 -0400
- Acceptlanguage: en-US
- Thread-topic: Payload free packages Printer script
Title: Re: Payload free packages Printer script
If you have the Package set to run as admin, then you wouldn’t need the sudo part of the command (it will run as root anyway).
If you don’t have the Package set to run as admin, you should. If you don’t, putting sudo in the script won’t get you anywhere and would probably generate the error you’re seeing.
--
Bryan S. Lee
From: Rusty Myers <email@hidden>
Date: Tue, 30 Jun 2009 09:46:15 -0400
To: <email@hidden>
Subject: Payload free packages Printer script
Hello,
We have a bunch of printers here. I wanted to make a package that
would give users the choice to install the printer they want. I
thought a payload free package could be used to do this.
I have tried to create a package that installs a file to /tmp and has
a postflight script that adds the printer. The postflight script is
very simple, it echo's one line with the printers name and then has
the lpadmin command to add the printer.
I can't get this working correctly. It says the postflight script has
failed. Anyone have a suggestion? I've looked at PrinterSetup from
lucid systems, but it's more complex than what I need.
Also, the printer is not already added to the system at the time of
running the script. The script also works from the command line. It
has execute permissions.
My Script:
echo "Add 201 Chambers Color"
sudo lpadmin -p "201_Chambers_Color" -E -v lpd://192.168.5.32 -P
"/Library/Printers/PPDs/Contents/Resources/Dell Laser Printer
5210n.gz" -L "201 Chambers Color"
My Log:
Jun 26 16:11:36 chm044
/System/Library/CoreServices/Installer.app/Contents/MacOS/Installer[4009]:
vm_allocate: 0, 0x5800000 - 0x25800000
Jun 26 16:11:36 chm044
/System/Library/CoreServices/Installer.app/Contents/MacOS/Installer[4009]:
vm_protect: 0
Jun 26 16:11:36 chm044 Installer[4009]: @(#)PROGRAM:Install PROJECT:Install-388
Jun 26 16:11:36 chm044 Installer[4009]: @(#)PROGRAM:Installer
PROJECT:Installer-281
Jun 26 16:11:36 chm044 Installer[4009]: Hardware: PowerMac12,1 @ 2.10
GHz, 1536 MB RAM
Jun 26 16:11:36 chm044 Installer[4009]: Running OS Build: Mac OS X 10.5.7 (9J61)
Jun 26 16:11:36 chm044 Installer[4009]: Env: PATH=/usr/bin:/bin:/usr/sbin:/sbin
Jun 26 16:11:36 chm044 Installer[4009]: Env:
TMPDIR=/var/folders/fs/fsqAcdmcFfiKsw-SQPNmME+++TI/-Tmp-/
Jun 26 16:11:36 chm044 Installer[4009]: Env: SHELL=/bin/bash
Jun 26 16:11:36 chm044 Installer[4009]: Env: HOME=/Users/etcadmin
Jun 26 16:11:36 chm044 Installer[4009]: Env: USER=etcadmin
Jun 26 16:11:36 chm044 Installer[4009]: Env: LOGNAME=etcadmin
Jun 26 16:11:36 chm044 Installer[4009]: Env: DISPLAY=/tmp/launch-Tw5ON0/:0
Jun 26 16:11:36 chm044 Installer[4009]: Env:
SSH_AUTH_SOCK=/tmp/launch-sfV73e/Listeners
Jun 26 16:11:36 chm044 Installer[4009]: Env:
Apple_PubSub_Socket_Render=/tmp/launch-ltE0SI/Render
Jun 26 16:11:36 chm044 Installer[4009]: Env: __CF_USER_TEXT_ENCODING=0x1F5:0:0
Jun 26 16:11:36 chm044 Installer[4009]: Env: SECURITYSESSIONID=9024e0
Jun 26 16:11:36 chm044 Installer[4009]: Env: COMMAND_MODE=unix2003
Jun 26 16:11:36 chm044 Installer[4009]: Printer Install Installation Log
Jun 26 16:11:36 chm044 Installer[4009]: Opened from:
/Users/Shared/Printer Install/Packages/Printer Install.mpkg
Jun 26 16:11:37 chm044 installdb[4011]: started (uid 96)
Jun 26 16:11:37 chm044 installdb[4011]: Opened receipt database on '/'
with schema 17.
Jun 26 16:11:38 chm044 Installer[4009]: Found receipt (full match) for
(201ChambersColor / edu.psu.educ.printerInstall.201ChambersColor.pkg):
(201ChambersColor / edu.psu.educ.printerInstall.201ChambersColor.pkg)
Jun 26 16:11:38 chm044 Installer[4009]: Found receipt (full match) for
(201Chambers / edu.psu.educ.printerInstall.201Chambers.pkg):
(201Chambers / edu.psu.educ.printerInstall.201Chambers.pkg)
Jun 26 16:11:42 chm044 Installer[4009]:
================================================================================
Jun 26 16:11:42 chm044 Installer[4009]: User picked Custom Install
Jun 26 16:11:42 chm044 Installer[4009]: Choices selected for installation:
Jun 26 16:11:42 chm044 Installer[4009]: Upgrade: "Printer Install"
Jun 26 16:11:42 chm044 Installer[4009]: Upgrade: "201 Chambers Color"
Jun 26 16:11:42 chm044 Installer[4009]: 201ChambersColor.pkg :
edu.psu.educ.printerInstall.201ChambersColor.pkg : 1
Jun 26 16:11:42 chm044 Installer[4009]:
================================================================================
Jun 26 16:11:42 chm044 Installer[4009]: It took 0.00 seconds to
summarize the package selections.
Jun 26 16:11:44 chm044 installdb[4011]: done. (0.009u + 0.007s)
Jun 26 16:11:50 chm044 runner[4012]: Administrator authorization granted.
Jun 26 16:11:50 chm044 Installer[4009]:
================================================================================
Jun 26 16:11:50 chm044 Installer[4009]: User picked Standard Install
Jun 26 16:11:50 chm044 Installer[4009]: Choices selected for installation:
Jun 26 16:11:50 chm044 Installer[4009]: Upgrade: "Printer Install"
Jun 26 16:11:50 chm044 Installer[4009]: Upgrade: "201 Chambers Color"
Jun 26 16:11:50 chm044 Installer[4009]: 201ChambersColor.pkg :
edu.psu.educ.printerInstall.201ChambersColor.pkg : 1
Jun 26 16:11:50 chm044 Installer[4009]:
================================================================================
Jun 26 16:11:50 chm044 Installer[4009]: It took 0.00 seconds to
summarize the package selections.
Jun 26 16:11:50 chm044 Installer[4009]:
-[IFDInstallController(Private) _buildInstallPlan]: location =
file://localhost
Jun 26 16:11:50 chm044 Installer[4009]:
-[IFDInstallController(Private) _buildInstallPlan]:
file://localhost/Users/Shared/Printer Install/Packages/Printer Install.mpkg/Contents/Packages/201ChambersColor.pkg
Jun 26 16:11:50 chm044 Installer[4009]: _installNextPackage of 1
Jun 26 16:11:50 chm044 installdb[4015]: started (uid 96)
Jun 26 16:11:50 chm044 installdb[4015]: Opened receipt database on '/'
with schema 17.
Jun 26 16:11:50 chm044 Installer[4009]: Found receipt (full match) for
(201ChambersColor / edu.psu.educ.printerInstall.201ChambersColor.pkg):
(201ChambersColor / edu.psu.educ.printerInstall.201ChambersColor.pkg)
Jun 26 16:11:50 chm044 Installer[4009]: Starting installation:
Jun 26 16:11:50 chm044 Installer[4009]: Preparing volume "Macintosh
HD" for installation
Jun 26 16:11:50 chm044 Installer[4009]: Configuring volume "Macintosh HD"
Jun 26 16:11:51 chm044 Installer[4009]: Preparing disk for local booted install.
Jun 26 16:11:51 chm044 Installer[4009]: Free space on "Macintosh HD":
215 GB (231295029248 bytes).
Jun 26 16:11:51 chm044 Installer[4009]: Create temporary directory
"/private/tmp/201ChambersColor.pkg.4009GCobQz"
Jun 26 16:11:51 chm044 Installer[4009]: Running install actions
Jun 26 16:11:51 chm044 Installer[4009]: Processing 201 Chambers Color:
Jun 26 16:11:51 chm044 Installer[4009]: Determining files to install
Jun 26 16:11:51 chm044 Installer[4009]: It took 0.01 seconds to
create the install plan for 201ChambersColor.
Jun 26 16:11:51 chm044 Installer[4009]: Configuring deferred files
Jun 26 16:11:52 chm044 Installer[4009]: Determining obsolete files
Jun 26 16:11:52 chm044 Installer[4009]: Assembling temporary receipt
Jun 26 16:11:52 chm044 Installer[4009]: Performing
pre-extraction actions
Jun 26 16:11:52 chm044 Installer[4009]: Removing obsoleted files
Jun 26 16:11:52 chm044 Installer[4009]: Creating destination path
Jun 26 16:11:52 chm044 Installer[4009]: Validating package payload
Jun 26 16:11:52 chm044 Installer[4009]: Starting file extraction
Jun 26 16:11:52 chm044 pkgExtractor[4017]: Extracting...
Jun 26 16:11:52 chm044 pkgExtractor[4017]: 2 of 2 files written in
0.01 seconds.
Jun 26 16:11:52 chm044 pkgExtractor[4017]: 8 kilobytes installed
at 0.7 MB/s.
Jun 26 16:11:52 chm044 Installer[4009]: Performing
post-extraction actions
Jun 26 16:11:52 chm044 Installer[4009]: Finishing receipt
Jun 26 16:11:52 chm044 Installer[4009]: run postflight script for 201
Chambers Color
Jun 26 16:11:52 chm044 Installer[4009]: Install failed: The following
install step failed: run postflight script for 201 Chambers Color.
Contact the software manufacturer for assistance.
Jun 26 16:11:52 chm044 Installer[4009]: IFDInstallController 855BB0 state = 7
Jun 26 16:11:52 chm044 Installer[4009]: Displaying 'Install Failed' UI.
Jun 26 16:11:52 chm044 Installer[4009]: 'Install Failed' UI displayed
message:'The following install step failed: run postflight script for
201 Chambers Color. Contact the software manufacturer for
assistance.'.
Jun 26 16:11:56 chm044 installdb[4015]: done. (0.009u + 0.008s)
Thanks,
Rusty
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Installer-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Installer-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden