Find All Occurrences always fails within loop
Dear forumers,
There's this strange problem that requires a fix.
Finding all occurences of '#' works fine here:-
REPORT zz_test.
DATA: lv_text TYPE string,
ls_result TYPE match_result,
et_release type table of yytc_release,
lt_result TYPE match_result_tab.
lv_text = '"RFC-1234#Create ""Payroll"" under NL directory"'.
FIND ALL OCCURRENCES OF REGEX '#'
IN lv_text
RESULTS lt_result IGNORING CASE IN CHARACTER MODE.
IF sy-subrc = 0. " SY-SUBRC is always 0
READ TABLE lt_result INTO ls_result INDEX 1.
WRITE :'Offset: ' .
WRITE: ls_result-offset .
WRITE: lv_text+00(ls_result-offset).
ENDIF.
But it always fails here, within a loop at an internal table:-
SELECT * .... INTO TABLE it_jira ...
LOOP AT it_jira ASSIGNING <jira>.
<release>-summary = <jira>-summary.
IF <release>-type CS 'Subtask'.
" <release>-summary is of data type CHAR255
PERFORM get_subtask USING <release>-summary.
ENDIF.
ENDLOOP.
FORM get_subtask USING pv_summary TYPE yytc_release-summary.
DATA:
lv_string TYPE char255,
lv_final TYPE char255,
lv_summary TYPE string,
lv_strlen TYPE i,
lt_result TYPE match_result_tab.
lv_string = pv_summary. " LV_STRING = '"RFC-1234#Create ""Payroll"" under NL directory"''
CONDENSE lv_string.
lv_strlen = STRLEN( lv_string ).
lv_strlen = lv_strlen - 1.
IF lv_string+0(1) = '"' AND lv_string+lv_strlen(1) = '"'.
lv_strlen = lv_strlen - 1.
WRITE lv_string+1(lv_strlen) TO lv_final+1(254).
ENDIF.
lv_summary = lv_final.
" FIND ALL OCCURRENCES OF '#'
" IN lv_summary
" RESULTS lt_result IGNORING CASE. * SY-SUBRC is always 4 here too
FIND ALL OCCURRENCES OF REGEX '#'
IN lv_summary
RESULTS lt_result IGNORING CASE IN CHARACTER MODE.
IF sy-subrc = 0. " SY-SUBRC is always 4 here - why?! :(
ENDIF.
CLEAR: lv_string,
lt_result.
ENDFORM. " GET_SUBTASK
Only when the string LV_SUMMARY is edited from within the debugger (add space to the string prefix, etc), the SY-SUBRC will be 0 and there'll be data found in LT_RESULT.
How can I resolve this issue? Please do help. Thanks.
I think the subtle difference is that in your first example the character is actually '#' whereas in the second example it is actually another (unprintable)value such-as line-feed and only APPEARS to be '#'.
You must find out what the value in question is(will it always be the same value?) and then replace that instead of '#'.
Similar Messages
-
Excel Online - Perform a find all occurrences
When a perform a Ctrl-F or use the Find feature on Excel online, only the first occurrence is returned.
Is there a way to perform a Find all occurrences?
Is there a way for the pop-up find window not to close after an occurrence is found?Press Ctrl-F, then click the Options >> button , choose your options, then press the "Find all" button.
If you want to search multiple sheets, select the sheets before pressing Ctrl-F.... -
Ideally, I could then see the spreadsheet with only those rows visible. If that's not possible, then at least a search on the single row so I can eyeball the search results to see what I have. I can't find any way to do this kind of search. If it matters, I'm running 10.8.5 and Numbers '09.
Use the reorganize panel to filter on column A. To open the reorganize panel, select the table, then select the menu item "Table > Show Reorganize Panel"
-
Please help, finding all zip codes within a given radius.
I have a table which contains zip, city, state, latdec, longdec, latrad, longrad.
From search screen, user want's to find all zip code's, within
10 mile radius of his zip code.
I came up with following sql but it is not correct:
First, find his latdec, longdec from his zipcode.
Then add radius to those values and do select as follows:
select zip,
latdec, longdec,
city, state, latrad, longrad
from zip_coord
where latdec >= (latdec - 10)
and latdec <= (latdec + 10)
and longdec >= (longdec - 10)and longdec <= (longdec + 10).
I think i need to include radians too, but i'm not able to come up with logical formula.
I would appreciate any help with this topic.
Thanks in advanceI am not sure I understand the gerography concept, but I think the query should be like this:
select zip, latdec, longdec,city, state, latrad, longrad
from zip_coord
where latdec between( select latdec from zip_record where zip='userinput', select latdec+10 from zip_record where zip='userinput')
and longdec between( select longdec from zip_record where zip='userinput', select longdec+10 from zip_record where zip='userinput')
and latrad between( select latrad from zip_record where zip='userinput', select latrad+10 from zip_record where zip='userinput')
and longrad between( select longrad from zip_record where zip='userinput', select longrad+10 from zip_record where zip='userinput')
Hope, it can help.
Aiping -
"Find all occurences of" issue
Hi experts,
I have an issue and I need some help.
I have one internal table for equipments and it's one column contains status values as:
COL1
AVLB
ESTO PIAC
PIAC
Now, on the selection screen, I have a select option for equipment status.
So, suppose, if user enters values AVLB and ESTO is select option, then out of these 3 entries only entry 1 and 2 should come.
Third entry should not come as it is neither AVLB nor PIAC.
For this, I thought of using
FIND ALL OCCURRENCES OF <what to give in here> IN TABLE i_main
RESULTS results.
I can not hard code any status as it will be determined by select option and select option could have multiple entries.
How do I filter out the table entries based upon the select option values.
I can not use
delete i_main where status not in s_stat. (as this status column is a concatenation of various equipment status values)
Please help me on the same.Hi,
Try this way. It works.
REPORT ztest_program.
DATA: BEGIN OF it_data OCCURS 0,
text TYPE char15,
END OF it_data.
SELECT-OPTIONS:s_text FOR it_data-text.
*"START-OF-SELECTION.
START-OF-SELECTION.
"Populating data
it_data-text = 'AVLB'.
APPEND it_data.
CLEAR it_data.
it_data-text = 'ESTO PIAC'.
APPEND it_data.
CLEAR it_data.
it_data-text = 'PIAC'.
APPEND it_data.
CLEAR it_data.
"If you give select options AVLB and ESTO*, It works as you expected.
LOOP AT it_data WHERE text IN s_text.
WRITE:/ it_data-text.
ENDLOOP.
"If you give select options AVLB and ESTO, It works as you expected.
LOOP AT it_data.
LOOP AT s_text.
IF it_data-text CS s_text-low.
WRITE:/ it_data-text.
ENDIF.
ENDLOOP.
ENDLOOP.
Thanks
Venkat.O -
Preview Doesn't Find All Searched Text in PDFs
I downloaded a PDF copy of my home insurance policy and I had it opened in Preview. The pages are displayed in the side bar. When I type in a search query such as "building" or "personal" or "dwelling" it doesn't find all occurrences if any yet I know there should be plenty of hits.
I guess I can try Adobe Acrobat.
Thanks for any advice.
KelvinI get 4 results when I search for ''<identifier>'' on that web page.
Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem.
*Switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance
*Do NOT click the Reset button on the Safe Mode start window
*https://support.mozilla.org/kb/Safe+Mode
*https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes -
I have a 2009 MB Pro. I have been trying to do some cleaning of files and discovered that in Finder, All Images, I am experiencing a frustrating problem. I spent a few hours trashing over 4K images and within a few hours, I had as many more. I did a couple of thousand trashed images and half hour later, more arrived. There are a lot of images that seem off the internet, including gif.s, png.s. Help!
First, back up all data immediately, as your boot drive might be failing.
There are a few other possible causes of generalized slow performance that you can rule out easily.
Reset the System Management Controller.
If you have many image or video files on the Desktop with preview icons, move them to another folder.
If applicable, uncheck all boxes in the iCloud preference pane.
Disconnect all non-essential wired peripherals and remove aftermarket expansion cards, if any.
Check your keychains in Keychain Access for excessively duplicated items.
If you have more than one user account, you must be logged in as an administrator to carry out this step.
Launch the Console application in the same way you launched Activity Monitor. Make sure the title of the Console window is All Messages. If it isn't, select All Messages from the SYSTEM LOG QUERIES menu on the left. If you don't see that menu, select
View ▹ Show Log List
from the menu bar.
Select the 50 or so most recent entries in the log. Copy them to the Clipboard (command-C). Paste into a reply to this message (command-V). You're looking for entries at the end of the log, not at the beginning.
When posting a log extract, be selective. Don't post more than is requested.
Please do not indiscriminately dump thousands of lines from the log into this discussion.
Important: Some personal information, such as your name, may appear in the log. Anonymize before posting. That should be easy to do if your extract is not too long. -
Hi guys, I downloaded this new iOS7.1 but it always fails to install. It says I am not connected to the Internet while I have all the network and second excuse it gives is that the software update is currently unavailable. Please help.
Hi Romantilizer,
Hook your phone up to iTunes on the computer you sync with and do your update from there. This is a robust iOS release, and doing it OTA is not always successful. I tried on my iPhone a couple of times, and it aborted the update twice. Did it via the Mac, and it was fine.
It takes a bit of time, so hook it up, make sure it is updating your phone, and then find something else to do for a couple of hours.
Cheers,
GB -
I need a SQL to find all users within OID
Hi,
I'm trying to find all usernames and last logon in OID and was thinking of two ways to do this.
1. query OID with ldapsearch
2. query LDAP schema in Oracle database.
Any ideas on how to do this and what is the best way. If a sql in the database could solve this it would really be the best way for me.
Regards
MortenI did a:
SELECT DISTINCT user_name
FROM orasso.wwsso_audit_log_table_t
WHERE action_code = 1001
But this only gives me the users that have loged on to SSO.. I need all users even those who haven't loged on.
All help will be really good.
Regards -
System Image Utility always fails, why?
Hi everyone,
on my clean and fresh install of 10.7.4 Server the System Image Utility always fails to create an image. I want to create a NetInstall image and have put the OS X Lion Installer in /Applications. I can select it in SIU and choose to create a NetInstall image. It asks for the admin pw and always presents an error at the very end: Image creation failed. An unknown error has occured.
If I select to create a NetBoot image instead it fails directly after clicking on the Create button with this slightly different message: Image creation failed. An error has occured. At least it’s no unknown error…
Any ideas what might be causing this? I have succesfully created NetInstall images with 10.6 Server and 10.8 Server, but 10.7 Server somehow won’t play nice.
Thanks
BjörnHi Brian,
I first deleted the Installer and redownloaded it from the App Store, just to make sure there was no problem with it. Even though I now have the 10.7.4 Installer (had 10.7.0 before) nothing has changed. I then went on to set the log level as suggested. I now get different errors based on the chosen log level.
Log level set to debug:
Image creation failed.
*** -[__NSArrayM insertObject:atIndex:]: object cannot be nil
Log level set to verbose:
Image creation failed.
An unknown error has occurred.
I did not see anything helpful in the logs unfortunately. The only noticeable thing mentioned was: Failed to create image from installer media.
Any additional ideas? I will attach both logs here, just in case.
VERBOSE LOG:
Starting image creation.
Workflow Started (2012-09-08 14:08:00 +0200)
Mac OS X Server 10.7.4 (11E53), System Image Utility 10.7.3 (543)
Starting action: Define Image Source (1.3)
Finished running action: Define Image Source
Starting action: Create Image (1.6.2)
Starting image creation process...
Create NetInstall Image
Initiating NetInstall from Installer media.
Creating working path at /Users/vm/Desktop/NetInstall of Install Mac OS X Lion
Creating disk image (Size: 4062 MB)
Finalizing disk image.
created: /Users/vm/Desktop/NetInstall of Install Mac OS X Lion/NetInstall.dmg
Attaching disk image
Copying /Volumes/Mac OS X Install ESD
Preparing the kernel and boot loader for the boot image
/Users/vm/Desktop/NetInstall of Install Mac OS X Lion/i386
/Users/vm/Desktop/NetInstall of Install Mac OS X Lion/i386/x86_64
Copying /Volumes/Mac OS X Install ESD/boot.efi
Copying /Volumes/Mac OS X Install ESD/System/Library/CoreServices/PlatformSupport.plist
Performing post install cleanup
Detaching disk image
"disk4" unmounted.
"disk4" ejected.
Correcting permissions. 501:20 /Users/vm/Desktop/NetInstall of Install Mac OS X Lion
Script is done.
Failed to create image from installer media.
An unknown error has occurred.
NetInstall creation failed.
Image creation process finished...
Stopping image creation.
Image creation failed.
DEBUG LOG:
Starting image creation.
Workflow Started (2012-09-08 13:59:22 +0200)
Mac OS X Server 10.7.4 (11E53), System Image Utility 10.7.3 (543)
Starting action: Define Image Source (1.3)
Finished running action: Define Image Source
Starting action: Create Image (1.6.2)
Starting image creation process...
Create NetInstall Image
Initiating NetInstall from Installer media.
progressPrefix="_progress"
++ progressPrefix=_progress
scriptsDebugKey="DEBUG"
++ scriptsDebugKey=DEBUG
imageIsUDIFKey="1"
++ imageIsUDIFKey=1
mountPoint=""
++ mountPoint=
ownershipInfoKey="501:20"
++ ownershipInfoKey=501:20
destVolFSType="HFS+"
++ destVolFSType=HFS+
installSource="/Volumes/Mac OS X Install ESD"
++ installSource='/Volumes/Mac OS X Install ESD'
dmgTarget="NetInstall"
++ dmgTarget=NetInstall
destPath="/Users/vm/Desktop/NetInstall of Install Mac OS X Lion"
++ destPath='/Users/vm/Desktop/NetInstall of Install Mac OS X Lion'
dmgVolName="NetInstall"
++ dmgVolName=NetInstall
. "${1}/createCommon.sh"
+ . /tmp/niutemp.Yv8Z6Mqx/createCommon.sh
# createCommon.sh
# Common functionality for the Image creation process.
# sourced in by the various SIU scripts
# Copyright © 2007-2011 Apple Inc. All rights reserved.
# Using dscl, create a user account
AddLocalUser()
# $1 volume whose local node database to modify
# $2 long name
# $3 short name
# $4 isAdminUser key
# $5 password data
# $6 password hint
# $7 user picture path
# $8 Language string
local databasePath="/Local/Default/Users/${3}"
local targetVol="${1}"
# Find a free UID between 501 and 599
for ((i=501; i<600; i++)); do
output=`/usr/bin/dscl -f "${targetVol}/var/db/dslocal/nodes/Default" localonly -search /Local/Default/Users UniqueID $i`
# If there is already an account dscl returns it, so we're looking for an empty return value.
if [ "$output" == "" ]; then
break
fi
done
# Create the user record
/usr/bin/dscl -f "${targetVol}/var/db/dslocal/nodes/Default" localonly -create $databasePath
if [ $? != 0 ]; then
echo "Failed to create '${databasePath}'."
return 1
fi
# Add long name
/usr/bin/dscl -f "${targetVol}/var/db/dslocal/nodes/Default" localonly -append $databasePath RealName "${2}"
if [ $? != 0 ]; then
echo "Failed to set the RealName."
return 1
fi
# Add PrimaryGroupID
if [ "${4}" == 1 ]; then
/usr/bin/dscl -f "${targetVol}/var/db/dslocal/nodes/Default" localonly -append $databasePath PrimaryGroupID 80
else
/usr/bin/dscl -f "${targetVol}/var/db/dslocal/nodes/Default" localonly -append $databasePath PrimaryGroupID 20
fi
if [ $? != 0 ]; then
echo "Failed to set the PrimaryGroupID."
return 1
fi
# Add UniqueID
/usr/bin/dscl -f "${targetVol}/var/db/dslocal/nodes/Default" localonly -append $databasePath UniqueID ${i}
if [ $? != 0 ]; then
echo "Failed to set the UniqueID."
return 1
fi
# Add Home Directory entry
/usr/bin/dscl -f "${targetVol}/var/db/dslocal/nodes/Default" localonly -append $databasePath NFSHomeDirectory /Users/${3}
if [ $? != 0 ]; then
echo "Failed to set the NFSHomeDirectory."
fi
if [ "${6}" != "" ]; then
/usr/bin/dscl -f "${targetVol}/var/db/dslocal/nodes/Default" localonly -append $databasePath AuthenticationHint "${6}"
if [ $? != 0 ]; then
echo "Failed to set the AuthenticationHint."
return 1
fi
fi
/usr/bin/dscl -f "${targetVol}/var/db/dslocal/nodes/Default" localonly -append $databasePath picture "${7}"
if [ $? != 0 ]; then
echo "Failed to set the picture."
return 1
fi
/usr/bin/dscl -f "${targetVol}/var/db/dslocal/nodes/Default" localonly -passwd $databasePath "${5}"
if [ $? != 0 ]; then
echo "Failed to set the passwd."
return 1
fi
# Add shell
/usr/bin/dscl -f "${targetVol}/var/db/dslocal/nodes/Default" localonly -append $databasePath UserShell "/bin/bash"
if [ $? != 0 ]; then
echo "Failed to set the UserShell."
return 1
fi
# Create Home directory
if [ -e "/System/Library/User Template/${8}.lproj/" ]; then
/usr/bin/ditto "/System/Library/User Template/${8}.lproj/" "${targetVol}/Users/${3}"
else
/usr/bin/ditto "/System/Library/User Template/English.lproj/" "${targetVol}/Users/${3}"
fi
if [ $? != 0 ]; then
echo "Failed to copy the User Template."
return 1
fi
/usr/sbin/chown -R $i:$i "${targetVol}/Users/${3}"
if [ $? != 0 ]; then
echo "Failed to set ownership on the User folder."
return 1
fi
# Copies a list of files (full paths contained in the file at $1) from source to the path specified in $2
CopyEntriesFromFileToPath()
local theFile="$1"
local theDest="$2"
local opt=""
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
opt="-v"
fi
while read FILE
do
if [ -e "${FILE}" ]; then
local leafName=`basename "${FILE}"`
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
echo "Copying ${FILE}."
fi
/usr/bin/ditto $opt "${FILE}" "${theDest}/${leafName}" || return 1
fi
done < "${theFile}"
return 0
# Copies a list of packages (full path, destination pairs contained in the file at $1) from source to .../System/Installation/Packages/
CopyPackagesWithDestinationsFromFile()
local theFile="$1"
local opt=""
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
opt="-v"
fi
while read FILE
do
if [ -e "${FILE}" ]; then
local leafName=`basename "${FILE}"`
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
echo "Copying ${FILE}."
fi
read SUB_PATH
/usr/bin/ditto $opt "${FILE}" "${mountPoint}/Packages/${SUB_PATH}${leafName}" || return 1
fi
done < "${theFile}"
return 0
# Create an installer package in ${1} wrapping the supplied script ${2}
CreateInstallPackageForScript()
local tempDir="$1"
local scriptPath="$2"
local scriptName=`basename "${scriptPath}"`
local entryDir=`pwd`
local opt=""
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
echo "Create installer for script ${scriptName}"
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
opt="-v"
fi
fi
# shouldn't exist on entry...
if [ -e "${tempDir}/emptyDir" ]; then
/bin/rm -rf "${tempDir}/emptyDir"
fi
# make some directories to work in
/bin/mkdir $opt -p "${tempDir}/${scriptName}.pkg/Contents/Resources" || return 1
/bin/mkdir $opt "${tempDir}/emptyDir" || return 1
# Create Archive.pax.gz
cd "${tempDir}/emptyDir"
/bin/pax -w -x cpio -f "${tempDir}/${scriptName}.pkg/Contents/Archive.pax" .
/usr/bin/gzip "${tempDir}/${scriptName}.pkg/Contents/Archive.pax"
cd "${entryDir}"
# Create the Archive.bom file
/usr/bin/mkbom "${tempDir}/emptyDir/" "${tempDir}/${scriptName}.pkg/Contents/Archive.bom" || return 1
# Create the Info.plist
/bin/cat > "${tempDir}/${scriptName}.pkg/Contents/Info.plist" << END
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleIdentifier</key>
<string>com.apple.server.SystemImageUtility.${scriptName}</string>
<key>CFBundleShortVersionString</key>
<string>1</string>
<key>IFMajorVersion</key>
<integer>1</integer>
<key>IFMinorVersion</key>
<integer>0</integer>
<key>IFPkgFlagDefaultLocation</key>
<string>/tmp</string>
<key>IFPkgFlagInstallFat</key>
<false/>
<key>IFPkgFlagIsRequired</key>
<false/>
<key>IFPkgFormatVersion</key>
<real>0.10000000149011612</real>
</dict>
</plist>
END
echo "pkmkrpkg1" > "${tempDir}/${scriptName}.pkg/Contents/PkgInfo"
echo "major: 1\nminor: 0" > "${tempDir}/${scriptName}.pkg/Contents/Resources/package_version"
# Copy the script
/bin/cp "$scriptPath" "${tempDir}/${scriptName}.pkg/Contents/Resources/postflight"
# clean up
/bin/rm -r "${tempDir}/emptyDir"
return 0
# Validate or create the requested directory
CreateOrValidatePath()
local targetDir="$1"
if [ ! -d "${targetDir}" ]; then
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
echo "Creating working path at ${targetDir}"
fi
/bin/mkdir -p "${targetDir}" || return 1
fi
# If any exist, apply any user accounts
CreateUserAccounts()
# $1 volume whose local node database to modify
local count="${#userFullName[*]}"
local targetVol="${1}"
if [ $count -gt 0 ]; then
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
echo "Adding $count user account(s) to the image"
fi
for ((index=0; index<$count; index++)); do
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
echo "Adding user ${userFullName[$index]}"
fi
#lay down user here
AddLocalUser "${targetVol}" "${userFullName[$index]}" "${userUnixName[$index]}" "${userIsAdmin[$index]}" "${userPassword[$index]}" "${userPassHint[$index]}" "${userImagePath[$index]}" "${userLanguage[$index]}"
if [ $? != 0 ]; then
echo "Failed to create the User '${userUnixName[$index]}'."
return 1
fi
done
# "touch"
/usr/bin/touch "${targetVol}/private/var/db/.AppleSetupDone"
/usr/bin/touch "${targetVol}/Library/Receipts/.SetupRegComplete"
fi
# retry the hdiutil detach until we either time out or it succeeds
retry_hdiutil_detach()
local mount_point="${1}"
local tries=0
local forceAt=0
local limit=24
local opt=""
forceAt=$(($limit - 1))
while [ $tries -lt $limit ]; do
tries=$(( tries + 1 ))
/bin/sleep 5
echo "Attempting to detach the disk image again..."
/usr/bin/hdiutil detach "${mount_point}" $opt
if [ $? -ne 0 ]; then
# Dump a list of any still open files on the mountPoint
if [ "${scriptsDebugKey}" == "DEBUG" ]; then
/usr/sbin/lsof +fg "${mount_point}"
fi
if [ $tries -eq $forceAt ]; then
echo "Failed to detach disk image at '${mount_point}' normally, adding -force."
opt="-force"
fi
if [ $tries -eq $limit ]; then
echo "Failed to detach disk image at '${mount_point}'."
exit 1
fi
else
tries=$limit
fi
done
# Create the dyld shared cache files
DetachAndRemoveMount()
local theMount="${1}"
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
echo "Detaching disk image"
# Dump a list of any still open files on the mountPoint
if [ "${scriptsDebugKey}" == "DEBUG" ]; then
/usr/sbin/lsof +fg "${theMount}"
fi
fi
# Finally detach the image and dispose the mountPoint directory
/usr/bin/hdiutil detach "${theMount}" || retry_hdiutil_detach "${theMount}" || return 1
/bin/rmdir "${theMount}" || return 1
return 0
# If the pieces exist, enable remote access for the shell image
EnableRemoteAccess()
local srcVol="${1}"
local opt=""
if [ -e "${srcVol}/usr/lib/pam/pam_serialnumber.so.2" ]; then
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
echo "Enabling shell image remote access support"
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
opt="-v"
fi
fi
# install some things (again which aren't part of BaseSystem) needed for remote ASR installs
/usr/bin/ditto $opt "${srcVol}/usr/lib/pam/pam_serialnumber.so.2" "${mountPoint}/usr/lib/pam/pam_serialnumber.so.2" || return 1
if [ -e "${srcVol}/usr/sbin/installer" ]; then
/usr/bin/ditto $opt "${srcVol}/usr/sbin/installer" "${mountPoint}/usr/sbin/installer" || return 1
fi
# copy the sshd config and add our keys to the end of it
if [ -e "${srcVol}/etc/sshd_config" ]; then
/bin/cat "${srcVol}/etc/sshd_config" - > "${mountPoint}/etc/sshd_config" << END
HostKey /private/var/tmp/ssh_host_key
HostKey /private/var/tmp/ssh_host_rsa_key
HostKey /private/var/tmp/ssh_host_dsa_key
END
fi
fi
return 0
# If it exists, install the sharing names and/or directory binding support to the install image
HandleNetBootClientHelper()
local tempDir="${1}"
local targetVol="${2}"
local opt=""
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
opt="-v"
fi
if [ -e "${tempDir}/bindingNames.plist" ]; then
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
echo "Installing Directory Service binding information"
fi
/usr/bin/ditto $opt "${tempDir}/bindingNames.plist" "${targetVol}/etc/bindingNames.plist" || return 1
/usr/sbin/chown root:wheel "${targetVol}/etc/bindingNames.plist"
/bin/chmod 644 "${targetVol}/etc/bindingNames.plist"
fi
if [ -e "${tempDir}/sharingNames.plist" ]; then
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
echo "Installing Sharing Names support"
fi
/usr/bin/ditto $opt "${tempDir}/sharingNames.plist" "${targetVol}/etc/sharingNames.plist" || return 1
/usr/sbin/chown root:wheel "${targetVol}/etc/sharingNames.plist"
/bin/chmod 644 "${targetVol}/etc/sharingNames.plist"
fi
if [ -e "${tempDir}/NetBootClientHelper" ]; then
/usr/bin/ditto $opt "${tempDir}/NetBootClientHelper" "${targetVol}/usr/sbin/NetBootClientHelper" || return 1
/usr/sbin/chown root:wheel "${targetVol}/usr/sbin/NetBootClientHelper"
/bin/chmod 555 "${targetVol}/usr/sbin/NetBootClientHelper"
/usr/bin/ditto $opt "${tempDir}/com.apple.NetBootClientHelper.plist" "${targetVol}/System/Library/LaunchDaemons/com.apple.NetBootClientHelper.plist" || return 1
/usr/sbin/chown root:wheel "${targetVol}/System/Library/LaunchDaemons/com.apple.NetBootClientHelper.plist"
/bin/chmod 644 "${targetVol}/System/Library/LaunchDaemons/com.apple.NetBootClientHelper.plist"
# finally, make sure it isn't disabled...
/usr/libexec/PlistBuddy -c "Delete :com.apple.NetBootClientHelper" "${targetVol}/var/db/launchd.db/com.apple.launchd/overrides.plist" > /dev/null 2>&1
fi
return 0
# If any exist, install configuration profiles to the install image
InstallConfigurationProfiles()
local tempDir="${1}"
local targetVol="${2}"
local profilesDir="${targetVol}/var/db/ConfigurationProfiles"
local opt=""
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
opt="-v"
fi
if [ -e "${tempDir}/configProfiles.txt" ]; then
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
echo "Installing Configuration Profiles"
fi
/bin/mkdir -p "${profilesDir}/Setup" || return 1
# Make sure the perms are correct
/usr/sbin/chown root:wheel "${profilesDir}"
/bin/chmod 755 "${profilesDir}"
/usr/sbin/chown root:wheel "${profilesDir}/Setup"
/bin/chmod 755 "${profilesDir}/Setup"
/usr/bin/touch "${profilesDir}/.profilesAreInstalled"
CopyEntriesFromFileToPath "${tempDir}/configProfiles.txt" "${profilesDir}/Setup" || return 1
# Enable MCX debugging
if [ 1 == 1 ]; then
if [ -e "${targetVol}/Library/Preferences/com.apple.MCXDebug.plist" ]; then
/usr/libexec/PlistBuddy -c "Delete :debugOutput" "${targetVol}/Library/Preferences/com.apple.MCXDebug.plist" > /dev/null 2>&1
/usr/libexec/PlistBuddy -c "Delete :collateLogs" "${targetVol}/Library/Preferences/com.apple.MCXDebug.plist" > /dev/null 2>&1
fi
/usr/libexec/PlistBuddy -c "Add :debugOutput string -2" "${targetVol}/Library/Preferences/com.apple.MCXDebug.plist" > /dev/null 2>&1
/usr/libexec/PlistBuddy -c "Add :collateLogs string 1" "${targetVol}/Library/Preferences/com.apple.MCXDebug.plist" > /dev/null 2>&1
fi
fi
# Converts a list of scripts (full paths contained in the file at $1) into packages in $3
InstallScriptsFromFile()
local tempDir="${1}"
local theFile="${2}"
local targetDir="${3}"
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
echo "Converting scripts into install packages"
fi
while read FILE
do
if [ -e "${FILE}" ]; then
# make an installer package out of the script
CreateInstallPackageForScript "$tempDir" "${FILE}" || return 1
# copy the resulting package to the Packages directory
local leafName=`basename "${FILE}"`
/usr/bin/ditto $opt "${tempDir}/${leafName}.pkg" "${targetDir}/${leafName}.pkg" || return 1
# clean up
/bin/rm -r "${tempDir}/${leafName}.pkg"
fi
done < "${theFile}"
return 0
# Prepare the source by deleting stuff we don't want to copy if sourcing a volume
PostFlightDestination()
local tempDir="${1}"
local destDir="${2}"
local opt=""
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
echo "Performing post install cleanup"
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ] ; then
opt="-v"
fi
fi
# delete the DS indices to force reindexing...
if [ -e "${mountPoint}/var/db/dslocal/indices/Default/index" ]; then
/bin/rm $opt "${mountPoint}/var/db/dslocal/indices/Default/index"
fi
# detach the disk and remove the mount folder
DetachAndRemoveMount "${mountPoint}"
if [ $? != 0 ]; then
echo "Failed to detach and clean up the mount at '${mountPoint}'."
return 1
fi
echo "Correcting permissions. ${ownershipInfoKey} $destDir"
/usr/sbin/chown -R "${ownershipInfoKey}" "$destDir"
# Prepare the source by deleting stuff we don't want to copy if sourcing a volume
PreCleanSource()
local srcVol="$1"
local opt=""
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ] ; then
opt="-v"
fi
fi
if [ -e "$srcVol/private/var/vm/swapfile*" ]; then
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
echo "Removing swapfiles on $1"
fi
/bin/rm $opt "$srcVol/private/var/vm/swapfile*"
fi
if [ -d "$srcVol/private/tmp" ]; then
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
echo "Cleaning out /private/tmp on $1"
fi
/bin/rm -r $opt "$srcVol/private/tmp/*"
fi
if [ -d "$srcVol/private/var/tmp" ]; then
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
echo "Cleaning out /private/var/tmp on $1"
fi
/bin/rm -r $opt "$srcVol/private/var/tmp/*"
fi
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
echo "Cleaning out devices and volumes on $1"
fi
if [ -d "$srcVol/Volumes" ]; then
/bin/rm -r $opt "$srcVol/Volumes/*"
fi
if [ -d "$srcVol/dev" ]; then
/bin/rm $opt "$srcVol/dev/*"
fi
if [ -d "$srcVol/private/var/run" ]; then
/bin/rm -r $opt "$srcVol/private/var/run/*"
fi
# Copy kernel and build the kext cache on the boot image
PrepareKernelAndKextCache()
local srcDir="$1"
local destDir="$2"
local opt=""
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
echo "Preparing the kernel and kext cache for t /bin/rmdir "${theMount}" || return 1
return 0
# If the pieces exist, enable remote access for the shell image
EnableRemoteAccess()
local srcVol="${1}"
local opt=""
if [ -e "${srcVol}/usr/lib/pam/pam_serialnumber.so.2" ]; then
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
echo "Enabling shell image remote access support"
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
opt="-v"
fi
fi
# install some things (again which aren't part of BaseSystem) needed for remote ASR installs
/usr/bin/ditto $opt "${srcVol}/usr/lib/pam/pam_serialnumber.so.2" "${mountPoint}/usr/lib/pam/pam_serialnumber.so.2" || return 1
if [ -e "${srcVol}/usr/sbin/installer" ]; then
/usr/bin/ditto $opt "${srcVol}/usr/sbin/installer" "${mountPoint}/usr/sbin/installer" || return 1
fi
# copy the sshd config and add our keys to the end of it
if [ -e "${srcVol}/etc/sshd_config" ]; then
/bin/cat "${srcVol}/etc/sshd_config" - > "${mountPoint}/etc/sshd_config" << END
HostKey /private/var/tmp/ssh_host_key
HostKey /private/var/tmp/ssh_host_rsa_key
HostKey /private/var/tmp/ssh_host_dsa_key
END
fi
fi
return 0
# If it exists, install the sharing names and/or directory binding support to the install image
HandleNetBootClientHelper()
local tempDir="${1}"
local targetVol="${2}"
local opt=""
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
opt="-v"
fi
if [ -e "${tempDir}/bindingNames.plist" ]; then
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
echo "Installing Directory Service binding information"
fi
/usr/bin/ditto $opt "${tempDir}/bindingNames.plist" "${targetVol}/etc/bindingNames.plist" || return 1
/usr/sbin/chown root:wheel "${targetVol}/etc/bindingNames.plist"
/bin/chmod 644 "${targetVol}/etc/bindingNames.plist"
fi
if [ -e "${tempDir}/sharingNames.plist" ]; then
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
echo "Installing Sharing Names support"
fi
/usr/bin/ditto $opt "${tempDir}/sharingNames.plist" "${targetVol}/etc/sharingNames.plist" || return 1
/usr/sbin/chown root:wheel "${targetVol}/etc/sharingNames.plist"
/bin/chmod 644 "${targetVol}/etc/sharingNames.plist"
fi
if [ -e "${tempDir}/NetBootClientHelper" ]; then
/usr/bin/ditto $opt "${tempDir}/NetBootClientHelper" "${targetVol}/usr/sbin/NetBootClientHelper" || return 1
/usr/sbin/chown root:wheel "${targetVol}/usr/sbin/NetBootClientHelper"
/bin/chmod 555 "${targetVol}/usr/sbin/NetBootClientHelper"
/usr/bin/ditto $opt "${tempDir}/com.apple.NetBootClientHelper.plist" "${targetVol}/System/Library/LaunchDaemons/com.apple.NetBootClientHelper.plist" || return 1
/usr/sbin/chown root:wheel "${targetVol}/System/Library/LaunchDaemons/com.apple.NetBootClientHelper.plist"
/bin/chmod 644 "${targetVol}/System/Library/LaunchDaemons/com.apple.NetBootClientHelper.plist"
# finally, make sure it isn't disabled...
/usr/libexmountPoint=`mktemp -d "/tmp/mnt.XXXXXXXX"`
errExit()
echo "Execution of '`basename ${0}`' failed. Cleaning up."
# detach the disk and remove the mount folder
DetachAndRemoveMount "${mountPoint}"
/bin/rm -r "${destPath}"
exit 1
# Set up for script debugging
debug_opt=""
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ] ; then
debug_opt="-v"
fi
# Prepare the destination
CreateOrValidatePath "$destPath" || errExit
# update progress information
echo "${progressPrefix}_creatingImage_"
if [ -e "${installSource}/BaseSystem.dmg" ]; then
size=$2
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ] ; then
echo "Creating disk image (Size: $size MB)"
fi
/usr/bin/hdiutil create "$destPath/$dmgTarget" -megabytes $size -volname "${dmgVolName}" -uid 0 -gid 80 -mode 1775 -layout "SPUD" -fs "$destVolFSType" -stretch 500g -ov -puppetstrings || errExit
echo "${progressPrefix}_copyingSource_"
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ] ; then
echo "Attaching disk image"
fi
/usr/bin/hdiutil attach "${destPath}/${dmgTarget}.dmg" -owners on -nobrowse -noautoopen -mountpoint "${mountPoint}" -quiet || errExit
# Copy source Volume base system to
/usr/bin/ditto $debug_opt "${installSource}" "${mountPoint}" || errExit
else
echo "This does not appear to be a Mac OS X Install DVD."
errExit
fi
# If adding any additional packages or scripts
if [ -e "${1}/OSInstall.collection" ]; then
/usr/bin/ditto $debug_opt "${1}/OSInstall.collection" "${mountPoint}/Packages/OSInstall.collection" || errExit
/usr/sbin/chown root:wheel "${mountPoint}/Packages/OSInstall.collection"
# If adding any additional packages
if [ -e "${1}/additionalPackages.txt" ]; then
CopyPackagesWithDestinationsFromFile "${1}/additionalPackages.txt" || errExit
fi
# If adding any scripts
if [ -e "${1}/additionalScripts.txt" ]; then
InstallScriptsFromFile "${1}" "${1}/additionalScripts.txt" "${mountPoint}/Packages" || errExit
fi
fi
# If it exists, install the partition data onto the install image
ProcessAutoPartition "${1}" || errExit
# If it exists, install minstallconfig.xml (AutoInstall data) onto the install image
ProcessMinInstall "${1}" || errExit
# update progress information
echo "${progressPrefix}_buildingBooter_"
# Copy kernel and boot loader
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
echo "Preparing the kernel and boot loader for the boot image"
fi
# make sure this doesn't exist
if [ -e "${destPath}/i386" ]; then
/bin/rm -rf "${destPath}/i386"
fi
/bin/mkdir -p $debug_opt "${destPath}/i386/x86_64" || errExit
# copy these directly off the install media
/usr/bin/ditto $debug_opt "${installSource}/boot.efi" "${destPath}/i386/booter" || errExit
/usr/bin/chflags nohidden "${destPath}/i386/booter"
# Grab the relevant portion of the com.apple.Boot.plist
kernelFlags=`/usr/libexec/PlistBuddy -c "print :'Kernel Flags'" "${installSource}/Library/Preferences/SystemConfiguration/com.apple.Boot.plist"`
/usr/libexec/PlistBuddy -c "add :'Kernel Flags' string ${kernelFlags}" "${destPath}/i386/com.apple.Boot.plist" > /dev/null 2>&1
/usr/bin/ditto $debug_opt "${installSource}/System/Library/CoreServices/PlatformSupport.plist" "${destPath}/i386/PlatformSupport.plist" || errExit
# extract the kernel & kernelcache for the boot shell
/usr/bin/lipo -extract i386 "${mountPoint}/kernelcache" -output "${destPath}/i386/kernelcache" || errExit
/usr/bin/lipo -extract x86_64 "${mountPoint}/kernelcache" -output "${destPath}/i386/x86_64/kernelcache" || errExit
# Apply choice changes, if any
if [ -e "${1}/MacOSXInstaller.choiceChanges" ]; then
echo "Copy over package choice selection."
/usr/bin/ditto $debug_opt "${1}/MacOSXInstaller.choiceChanges" "${mountPoint}/Packages/Extras/MacOSXInstaller.choiceChanges"
fi
# update progress information
echo "${progressPrefix}_finishingUp_"
# perform the final cleanup
PostFlightDestination "${1}" "$destPath" || errExit
errExit
Vol/private/tmp" ]; then
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
echo "Cleaning out /private/tmp on $1"
fi
/bin/rm -r $opt "$srcVol/private/tmp/*"
fi
if [ -d "$srcVol/private/var/tmp" ]; then
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
echo "Cleaning out /private/var/tmp on $1"
fi
/bin/rm -r $opt "$srcVol/private/var/tmp/*"
fi
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
echo "Cleaning out devices and volumes on $1"
fi
if [ -d "$srcVol/Volumes" ]; then
/bin/rm -r $opt "$srcVol/Volumes/*"
fi
if [ -d "$srcVol/dev" ]; then
/bin/rm $opt "$srcVol/dev/*"
fi
if [ -d "$srcVol/private/var/run" ]; then
/bin/rm -r $opt "$srcVol/private/var/run/*"
fi
# Copy kernel and build the kext cache on the boot image
PrepareKernelAndKextCache()
local srcDir="$1"
local destDir="$2"
local opt=""
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
echo "Preparing the kernel and kext cache for tPERCENT:0.000000
PERCENT:4.332841
PERCENT:8.985722
PERCENT:12.358444
PERCENT:14.524864
PERCENT:16.617430
PERCENT:19.522402
PERCENT:21.614967
PERCENT:23.535204
PERCENT:26.070902
PERCENT:29.271296
PERCENT:33.111767
PERCENT:38.847858
PERCENT:42.343674
PERCENT:44.707043
PERCENT:46.578041
PERCENT:49.138355
PERCENT:51.772526
PERCENT:55.563763
PERCENT:58.567207
PERCENT:62.210735
PERCENT:64.795670
PERCENT:69.719353
PERCENT:74.741508
PERCENT:77.055641
PERCENT:79.591331
PERCENT:83.013290
PERCENT:85.548988
PERCENT:88.010834
PERCENT:91.728210
PERCENT:97.710487
PERCENT:100.000000
PERCENT:-1.000000
Finalizing disk image.
created: /Users/vm/Desktop/NetInstall of Install Mac OS X Lion/NetInstall.dmg
/bin/rmdir "${theMount}" || return 1
return 0
# If the pieces exist, enable remote access for the shell image
EnableRemoteAccess()
local srcVol="${1}"
local opt=""
if [ -e "${srcVol}/usr/lib/pam/pam_serialnumber.so.2" ]; then
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
echo "Enabling shell image remote access support"
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
opt="-v"
fi
fi
# install some things (again which aren't part of BaseSystem) needed for remote ASR installs
/usr/bin/ditto $opt "${srcVol}/usr/lib/pam/pam_serialnumber.so.2" "${mountPoint}/usr/lib/pam/pam_serialnumber.so.2" || return 1
if [ -e "${srcVol}/usr/sbin/installer" ]; then
/usr/bin/ditto $opt "${srcVol}/usr/sbin/installer" "${mountPoint}/usr/sbin/installer" || return 1
fi
# copy the sshd config and add our keys to the end of it
if [ -e "${srcVol}/etc/sshd_config" ]; then
/bin/cat "${srcVol}/etc/sshd_config" - > Creating working path at /Users/vm/Desktop/NetInstall of Install Mac OS X Lion
Creating disk image (Size: 4062 MB)
/tmp/ssh_host_dsa_key
END
fi
fi
return 0
# If it exists, install the sharing names and/or directory binding support to the install image
HandleNetBootClientHelper()
local tempDir="${1}"
local targetVol="${2}"
local opt=""
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
opt="-v"
fi
if [ -e "${tempDir}/bindingNames.plist" ]; then
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
echo "Installing Directory Service binding information"
fi
/usr/bin/ditto $opt "${tempDir}/bindingNames.plist" "${targetVol}/etc/bindingNames.plist" || return 1
/usr/sbin/chown root:wheel "${targetVol}/etc/bindingNames.plist"
/bin/chmod 644 "${targetVol}/etc/bindingNames.plist"
fi
if [ -e "${tempDir}/sharingNames.plist" ]; then
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
echo "Installing Sharing Names support"
fi
/usr/bin/ditto $opt "${tempDir}/sharingNames.plist" "${targetVol}/etc/sharingNames.plist" || return 1
/usr/sbin/chown root:wheel "${targetVol}/etc/sharingNames.plist"
/bin/chmod 644 "${targetVol}/etc/sharingNames.plist"
fi
if [ -e "${tempDir}/NetBootClientHelper" ]; then
/usr/bin/ditto $opt "${tempDir}/NetBootClientHelper" "${targetVol}/usr/sbin/NetBootClientHelper" || return 1
/usr/sbin/chown root:wheel "${targetVol}/usr/sbin/NetBootClientHelper"
/bin/chmod 555 "${targetVol}/usr/sbin/NetBootClientHelper"
/usr/bin/ditto $opt "${tempDir}/com.apple.NetBootClientHelper.plist" "${targetVol}/System/Library/LaunchDaemons/com.apple.NetBootClientHelper.plist" || return 1
/usr/sbin/chown root:wheel "${targetVol}/System/Library/LaunchDaemons/com.apple.NetBootClientHelper.plist"
/bin/chmod 644 "${targetVol}/System/Library/LaunchDaemons/com.apple.NetBootClientHelper.plist"
# finally, make sure it isn't disabled...
/usr/libex
# update progress information
echo "${progressPrefix}_creatingImage_"
if [ -e "${installSource}/BaseSystem.dmg" ]; then
size=$2
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ] ; then
echo "Creating disk image (Size: $size MB)"
fi
/usr/bin/hdiutil create "$destPath/$dmgTarget" -megabytes $size -volname "${dmgVolName}" -uid 0 -gid 80 -mode 1775 -layout "SPUD" -fs "$destVolFSType" -stretch 500g -ov -puppetstrings || errExit
echo "${progressPrefix}_copyingSource_"
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ] ; then
echo "Attaching disk image"
fi
/usr/bin/hdiutil attach "${destPath}/${dmgTarget}.dmg" -owners on -nobrowse -noautoopen -mountpoint "${mountPoint}" -quiet || errExit
# Copy source Volume base system to
/usr/bin/ditto $debug_opt "${installSource}" "${mountPoint}" || errExit
else
echo "This does not appear to be a Mac OS X Install DVD."
errExit
fi
# If adding any additional packages or scripts
if [ -e "${1}/OSInstall.collection" ]; then
/usr/bin/ditto $debug_opt "${1}/OSInstall.collection" "${mountPoint}/Packages/OSInstall.collection" || errExit
/usr/sbin/chown root:wheel "${mountPoint}/Packages/OSInstall.collection"
# If adding any additional packages
if [ -e "${1}/additionalPackages.txt" ]; then
CopyPackagesWithDestinationsFromFile "${1}/additionalPackages.txt" || errExit
fi
# If adding any scripts
if [ -e "${1}/additionalScripts.txt" ]; then
InstallScriptsFromFile "${1}" "${1}/additionalScripts.txt" "${mountPoint}/Packages" || errExit
fi
fi
# If it exists, install the partition data onto the install image
ProcessAutoPartition "${1}" || errExit
# If it exists, install minstallconfig.xml (AutoInstall data) onto the install image
ProcessMinInstall "${1}" || errExit
# update progress information
echo "${progressPrefix}_buildingBooter_"
# Copy kernel and boot loader
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
echo "Preparing the kernel and boot loader for the boot image"
fi
# make sure this doesn't exist
if [ -e "${destPath}/i386" ]; then
/bin/rm -rf "${destPath}/i386"
fi
/bin/mkdir -p $debug_opt "${destPath}/i386/x86_64" || errExit
# copy these directly off the install media
/usr/bin/ditto $debug_opt "${installSource}/boot.efi" "${destPath}/i386/booter" || errExit
/usr/bin/chflags nohidden "${destPath}/i386/booter"
# Grab the relevant portion of the com.apple.Boot.plist
kernelFlags=`/usr/libexec/PlistBuddy -c "print :'Kernel Flags'" "${installSource}/Library/Preferences/SystemConfiguration/com.apple.Boot.plist"`
/usr/libexec/PlistBuddy -c "add :'Kernel Flags' string ${kernelFlags}" "${destPath}/i386/com.apple.Boot.plist" > /dev/null 2>&1
/usr/bin/ditto $debug_opt "${installSource}/System/Library/CoreServices/PlatformSupport.plist" "${destPath}/i386/PlatformSupport.plist" || errExit
# extract the kernel & kernelcache for the boot shell
/usr/bin/lipo -extract i386 "${mountPoint}/kernelcache" -output "${destPath}/i386/kernelcache" || errExit
/usr/bin/lipo -extract x86_64 "${mountPoint}/kernelcache" -output "${destPath}/i386/x86_64/kernelcache" || errExit
# Apply choice changes, if any
if [ -e "${1}/MacOSXInstaller.choiceChanges" ]; then
echo "Copy over package choice selection."
/usr/bin/ditto $debug_opt "${1}/MacOSXInstaller.choiceChanges" "${mountPoint}/Packages/Extras/MacOSXInstaller.choiceChanges"
fi
# update progress information
echo "${progressPrefix}_finishingUp_"
# perform the final cleanup
PostFlightDestination "${1}" "$destPath" || errExit
rrExit
# Apply choice changes, if any
if [ -e "${1}/MacOSXInstaller.choiceChanges" ]; then
echo "Copy over package choice selection."
/usr/bin/ditto $debug_opt "${1}/MacOSXInstaller.choiceChanges" "${mountPoint}/Packages/Extras/MacOSXInstaller.choiceChanges"
fi
# update progress information
echo "${progressPrefix}_finishingUp_"
# perform the final cleanup
PostFlightDestination "${1}" "$destPath" || errExit
tDestination "${1}" "$destPath" || errExit
errExit
Vol/private/tmp" ]; then
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
echo "Cleaning out /private/tmp on $1"
fi
/bin/rm -r $opt "$srcVol/private/tmp/*"
fi
if [ -d "$srcVol/private/var/tmp" ]; then
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
echo "Cleaning out /private/var/tmp on $1"
fi
/bin/rm -r $opt "$srcVol/private/var/tmp/*"
fi
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
echo "Cleaning out devices and volumes on $1"
fi
if [ -d "$srcVol/Volumes" ]; then
/bin/rm -r $opt "$srcVol/Volumes/*"
fi
if [ -d "$srcVol/dev" ]; then
/bin/rm $opt "$srcVol/dev/*"
fi
if [ -d "$srcVol/private/var/run" ]; then
/bin/rm -r $opt "$srcVol/private/var/run/*"
fi
# Copy kernel and build the kext cache on the boot image
PrepareKernelAndKextCache()
local srcDir="$1"
local destDir="$2"
local opt=""
if [ "${scriptsDebugKey}" == "VERBOSE" -o "${scriptsDebugKey}" == "DEBUG" ]; then
Stopping image creation.
Terminating script!
Image creation failed. -
I'm trying to render a project of about 1 hour long, and it always fails.
If render from Premiere Pro, I get a dialog box that just says:
"Error rendering project
unknown error"
If I try to render from Adobe Media encoder, I get tthe following logs.
- Encoding Time: 00:03:54
06/18/2013 05:32:42 PM : Encoding Failed
Export Error
Error compiling movie.
Unknown error.
- Encoding Time: 00:03:59
06/18/2013 05:52:11 PM : Encoding Failed
Export Error
Error compiling movie.
Unknown error.
- Encoding Time: 00:08:08
06/18/2013 07:54:40 PM : Encoding Failed
Export Error
Error compiling movie.
Unknown error.Ok, Greg.
I'm so nice that I've actually prepared a complete project, with video, sequence and all that fancy stuff
I use the following settings to render it:
Format: H.264
Preset: [email protected]
If you render it from within Premiere, it gives you the error message at about 35 to 40%; the actual position is random.
Also, after the error message is shown, if you click "export" again, it immediately gives you the "unknown error" message, and it won't render anything until you quit Premiere.
When you quit Premiere, sometimes it crashes, sometimes it doesnt.
So, to me, the evidence points to a lost pointer in the Lumetri effect. If you tell those symptoms to a programmer, I'm sure will agree with it.
Please download the project from here:
https://docs.google.com/file/d/0ByqySS0VNaNUb0NRbjBCZFBhUjA/edit?usp=sharing
Also, please let me know when I can delete the file, since it takes too much space of google drive.
Hope this helps to solve the problem ASAP, since the Lumetri effect is my TOP favorite new feature of Premiere CC . -
Finding A Piece Of Text Within A Text?
Hi.
I am trying to create a program to find a piece of text within a file (containing text). I know that my life could be made much easier if I had the util.java.regex package but it doesn't seem to import.
I am working on a Windows XP Platform.
I have tried the Hello World program which works fine but it is just trying to import this package...I am trying to work through this slowly so that I can understand each stage... so where I have come upto now is why does the following code not compile. I am just interested in taking a .txt file at the standard input which is used to serach against an Actor's name that I specify in the next (argument?) line?
Thanks for all the help
My Code so far...
import java.io.*;
// This line always has to be put in
public class MyFirstFileReadingAppTwo
// Main method
public static void main (String args[])
// Stream to read file
System.out.print("Enter your filename: ");
BufferedReader br = new BufferedReader(new FileInputStream (System.in));
String userName = null;
try
// Open the input stream
String file = br.readLine();
BufferedReader reader2 = new BufferedReader(new FileReader(file));
// Read a line of text
System.out.println(new
ln(new (fin).readLine() );
// Close our input stream
fin.close();
// Catches any error conditions
catch (IOException e)
System.err.println ("Unable to read from file");
System.exit(-1);
} -
Adobe Application Manager - Always Failing
I have CS5 Extended and CS6 Extended, but - what they call
"Adobe Application Manager" (and i must call rubbish) - always fails
to install any updates after downloading them.
I have tried few times, and would suggest to Adobe: to stop being
embarrassed this way, and re-write the manager that really does the job.
It's clear that this "manager" part of so great CS software now is:
undoing all that good.
And - it's constantly giving you the warnings as this - not even true to what is going on
(in this case i am NOT running the manager already, and here is one of many wrong warnings,
before it fails to install any updates (again and again) - this is just one sample i've made today:
Michael.
=============1. You can open your Finder and navigate to Extension Manager CS6( "/Applications/Adobe Extension Manager CS6" ), and drag it to Trash.
2. Then download and install Extension Manager 6.0.4 full installer from
http://download.macromedia.com/pub/dw_exchange/extension_manager/mac/A dobeExtensionManager6.0.4All.dmg
3. After that, ignore the update message that "Extension Manager 6.0.4 is available".
Try installing the updates.
also uninstall & re install the adobe application manager.
try updating the program.
If still doesnt help then download & install the updates manually. -
Patching Always Fails on One WS Type
Since I've implemented Patch Management in my organization I've cycled through several different workstation types, but recently I'm having trouble with this past year's computer model in that patching always fails.
What is happening is that I have narrowed the patching down to doing the individual machines (HP dc7900). I'll select the patches I want to push go through the wizard using default settings and force the restart. The deployment process will go successfully but the install/launches will fail.
In the reporting I'll get a remediate.exe failure with a Windows error: Unknown error (0xffffffff) on the bundle package. On the workstation I'll get notification messages for every patch in the bundle. Overall ZCM status reporting says that the package was successfully deployed but in actuality absolutely zero updates are applied.
This happens the same for every dc7900 in our building which were set up using the same process as dc5700 and two generations of dc5800 workstations that all patch successfully. Has anyone run into a similar situation? Thanks!We make a new "source image" for each computer model that we have so different base images for the 5700, 5800 and 7900. All of our images are made with the same XP SP3 volume license and network deployed apps installed. The 57/5800 systems had Windows Updates enabled as "download and let me choose when to install" but with the 7900 we thought that we would be able to use Patch Management to deploy updates so on the image the updates were turned off, but we have since manually turned them back on to automatic to make sure they keep updating.
I did recently find out that this behavior also follows application bundles on these systems now. I usually deploy bundles as dynamic administrator but have read in another thread that deploying as system may cause less hassles but I haven't had a chance to test this yet. -
Finding all albums where a master is used
I lost several hardrives containing my original iphoto libraries that were the original referenced files from within Aperture, one I first set up Aperture years ago. At that time I "referenced" the files rather than including them within Aperture. Fortunately I also had a 3rd copy of all the source images that were input to iPhoto, saved by year/month (there's a lesson!). So I am now busy re-connecting 1000's of Aperture referenced images to the actual file each is to reference. One situation I've discovered is that there are times when I want to know in which albums an image, from a project file, is used. I could benefit from "discover albums" menu item to show me these albums - or a field in the meta data of an image that documents such information automatically when a master image (whether referenced or stored in Aperture) is included in an albumn. Neither, of course, exist (are you listening, Apple?)
Is there a tool that can help me figure this out - in which albums an image, from a project file, is used - without having to manually check all possible albums?I know. But it's like asking what's the point in being able to search for all photos shot at f8. The answer is that I need to find them. If you need to find all the albums with a particular photo, then that need is the point of being able to do so. People have needs depending on their workflow. I've often needed to find all albums containing a particular photo, to see when it was exported, or printed for example, which I always keep track of using albums. Just one example, but I hardly see the point in asking why someone would want a feature when it's perfectly clear in the original post. Sorry, but I just don't see the poiunt of your question.
Maybe you are looking for
-
Odd things here --- Both the dbo.MSP_EpmProject_UserView and the MSP_EpmProject tables, are missing a number of fields including: ProjectName; ProjectAuthorName; ProjectManagerName, etc. Looked in the schema to make sure I wasn't crazy, and they ar
-
my imac is frozen with the pop up notice of "usb over current notice, a usb device is currently drawing too much power. the hub it is attached to will be deactivated". have tried unplug and restart, no help. have tried power hub, no help. my wire
-
Perl command to Remove Extraneous ^M character
In preparing a fortran program with word and saving it in a text format -extraneous end-of- line characters appears ^M when displaying the file on unix with more command. What perl command will remove these characters ? What is the recommended applic
-
I am new to arch linux. I just installed telepathy and all the protocol clients. I added a new account in gtalk, and it never seems to connect. Can someone guide me, i am pretty noob in all this. Thanking you, Mehrzad
-
Help two sql queries toload target table
create table table1 (code varchar2(10) ,mod_time date); insert into table1 values('2533',to_date('31-JUL-2012', 'DD-MON-YY')); insert into table1 values('2534',to_date('31-JUL-2012', 'DD-MON-YY')); insert into table1 values('