- This topic has 24 replies, 3 voices, and was last updated 14 years, 6 months ago by
nobrainer.
-
AuthorPosts
-
September 21, 2010 at 8:29 pm #379511
nobrainer
ParticipantWell, I’m trying a new image… and I added some stuff to the firstboot pkg, but now I’m getting some errors…
[code] PHASE:Running package scripts…
%74.939766
./postflight: /Users/jwojda/instaDMG/InstallerFiles/InstaUp2DatePackages/Firstboot.mpkg/Contents/Packages/firstboot.pkg/Contents/Resources/postflight: line 48: unexpected EOF while looking for matching `”‘
./postflight: /Users/jwojda/instaDMG/InstallerFiles/InstaUp2DatePackages/Firstboot.mpkg/Contents/Packages/firstboot.pkg/Contents/Resources/postflight: line 51: syntax error: unexpected end of file
PackageKit: Install Failed: PKG: post-flight scripts for “com.shc.firstboot.firstboot.pkg”
Error Domain=PKInstallErrorDomain Code=112 UserInfo=0x1004b6870 “An error occurred while running scripts from the package “firstboot.pkg”.” {
NSFilePath = “./postflight”;
NSLocalizedDescription = “An error occurred while running scripts from the package U201cfirstboot.pkgU201d.”;
NSURL = “./Contents/Packages/firstboot.pkg — file://localhost/Users/jwojda/instaDMG/InstallerFiles/InstaUp2DatePackages/Firstboot.mpkg/”;
PKInstallPackageIdentifier = “com.shc.firstboot.firstboot.pkg”;
}
install:didFailWithError:Error Domain=PKInstallErrorDomain Code=112 UserInfo=0x1004b6870 “An error occurred while running scripts from the package “firstboot.pkg”.”
%97.750000
Install failed: The Installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance.
The install failed (The Installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance.)
Folder 16 Firstboot done (15:19:26)[/code]I went through the postflight lines 48, it’s the firewall enable. I noticed the script had the globalstate -int #. However, I looked online and it looked like I could remove the -int, so I did…
[code]sudo defaults write “${PREFS_DIR}/com.apple.alf” globalstate 2[/code]
That seems to be where it’s still bombing out, I verified the Root / Wheel permissions…
September 21, 2010 at 10:55 pm #379512dead2sin
ParticipantIt looks to me like you are missing a ” somewhere in a command on your postflight. Make sure you have them all, otherwise it won’t know where it ends.
Some other things, you can remove sudo because it is already being run as root, I’d also re-add the int, but that is only because I like being sure of the value type being written to the file.
Nate
September 22, 2010 at 1:40 pm #379514nobrainer
ParticipantI looked at the script again, I found a missing $ in the defaults write portion of the firewall… didn’t seem to make a difference.
[code]Running Script postflight.sh…
Script Exit Code:0
Script Result: Delete: Entry, “Disabled”, Does Not Exist
2010-09-22 06:22:51.869 defaults[4997:903] Unexpected argument 2; leaving defaults unchanged.
Unmounting file server…[/code]was all I got.
September 22, 2010 at 1:49 pm #379515dead2sin
ParticipantCould you remove any sensitive information from it and post it to pastebin or pastie and link it? I’d have to look over it to really see what is going on.
Nate
September 22, 2010 at 1:55 pm #379516nobrainer
ParticipantThank you so much!
[url]http://pastebin.com/EYLHd1C9[/url]
September 22, 2010 at 3:01 pm #379518dead2sin
ParticipantTwo things to try:
1. int needs to be -int 1 as follows:
[code]$defaults write “${PREFS_DIR}/com.apple.alf” globalstate -int 1[/code]
Try wrapping the homepage for safari in quotes. I’m thinking the symbols might be confusing it (And if this fixes it, I’ll update the documentation on the wiki to reflect it).
[code]$defaults write “${USERPREFS_DIR}/com.apple.Safari” HomePage “http://website”%5B/code%5D
Nate
September 23, 2010 at 10:00 pm #379542nobrainer
Participantsetting the -int 1 worked… so now the firewall is fine… the website is fine…still having trouble with the SSH, getting it to display the ‘list of users’, and display the logon banner. The SSH is critical as I can’t run any of my casper pushes / scripts / etc w/o it. I know the Casper SSH account is there because I can sign into the box with it.
Looking at line 39, it says echo allow groups domaingroup admin…. I didn’t change anything there and our admin group is named something else, could that affect it, or is that more like an argument passing?
The Banner, i think the syntax is correct, I made a separate script file for just that that works, so I’m not really sure why that one isn’t from the postflight.
[url]http://pastebin.com/2LcVfXRY[/url] is for my firstboot.sh file, it looks like it contains the info about SSH, and ARD stuff. The firewall is commented out there due to running the post flight script.
Looking at the debug log for instaDMG, it’s no longer giving an error about the package like it was doing prior.
[url]http://pastebin.com/5rHcZNv5[/url] is the postflight file, as it stands now.
Thank you!
John
September 28, 2010 at 12:29 pm #379560nobrainer
ParticipantI apologize for keeping this thread going, I’ve been tasked to get this new image done by September 30th, and I’m at the proverbial brick wall.
I signed in with the latest and greatest image I did, and I’m thinking the postflight.sh wasn’t called / ran. I can find in the logs the firstrun.sh file that was run… but I can’t find any reference to postflight.sh, and none of the settings seem to be put into the files, I even put in Echo’s so I could (hopefully) see them running in the log files.
When I make the Pkg, I can see that postflight.sh is there, I can open Pkgmaker and under contents go to firstboot –> scripts and in the section under “Postflight” I have scripts/postflight.sh, but as I said before, it doesn’t appear to be running.
I also acquired the company’s retail disk of 10.6 and imported that to use as the main install disk.
Update: Putting the postflight.sh contents into the firstboot script seemed to run everything. The login disclaimer is there, the ARD is active, the login window is list of users, firewall is on, etc
Things I see not working –
1) System Pref –> Sharing –> Remote Login “only these users” is selected but the box is blank, and
1a) –> We can’t push apps to the machine because the management account is not working2) System Pref –> Remote Managment All users is selected, but our local admin account (which is what we want to be the only account able to do it) is listed in the box.
I guess the last 2 items I need to resolve is those.
But that being said, I think that is proof that the postflight.sh script never ran, as a lot of those settings didn’t come through until I put in the firstboot.sh file.
September 28, 2010 at 3:49 pm #379561dead2sin
ParticipantPostflight runs when the package itself is installed on to the image during the InstaDMG process. Adding all that to the firstboot.sh will definitely work (I did it that way for the longest time), but I think doing it in a postflight is the best practice (If it can be modified at image creation time, it should be, else it should be modified upon first boot).
I’m not familiar with using legacy VNC settings, so I am not of much help there. I can confirm the kickstart command on osxdeployment works perfectly, but anything beyond that I’d have to test.
Nate
September 28, 2010 at 4:03 pm #379562nobrainer
ParticipantThey are all run as part of the firstboot.pkg file from the tutorial, but I could never find any log entries from the postflight.sh commands, only entries were from the firstboot.sh, which is why I combined the 2 files into firstboot.
I will go back and recheck the VNC / kickstart commands, maybe I deleted something when doing all the revisions.
-
AuthorPosts
- You must be logged in to reply to this topic.
Comments are closed