text
stringlengths 0
15.7k
| source
stringlengths 6
112
|
---|---|
tell NetworkPinger to return ping() | pingNetworkAddress.applescript |
end pingNetworkAddress | pingNetworkAddress.applescript |
property _app_id : "com.macromates.TextMate.Preview" | Edit with TextMate 2.applescript |
property _app_path : missing value | Edit with TextMate 2.applescript |
property _mate_path : "/Contents/Resources/mate" | Edit with TextMate 2.applescript |
property _mate_args : "-r" | Edit with TextMate 2.applescript |
if _pathnames is "" then return display alert "No valid files selected" as warning | Edit with TextMate 2.applescript |
if _app_path is missing value then set _app_path to POSIX path of (path to application id _app_id) as string | Edit with TextMate 2.applescript |
if _app_path is missing value then return display alert "Application not found!" as warning | Edit with TextMate 2.applescript |
do shell script quoted form of (_app_path & "/" & _mate_path) & " " & quoted form of _mate_args & " " & _pathnames | Edit with TextMate 2.applescript |
activate application id _app_id | Edit with TextMate 2.applescript |
set file_aliases to choose file with prompt "Please select one or more files to import into iTunes:" with multiple selections allowed without invisibles | Script 21-3.applescript |
tell application "iTunes" to add file_aliases | Script 21-3.applescript |
set Debug to false | cDOT%20Install%20Commands%20(8.1).scpt |
if (not Debug) then | cDOT%20Install%20Commands%20(8.1).scpt |
set platformList to {"32xx", "62xx", "VSIM"} | cDOT%20Install%20Commands%20(8.1).scpt |
set platform to {choose from list platformList with title "Platform?" with prompt "Select hardware platform (no mixed clusters):"} as text | cDOT%20Install%20Commands%20(8.1).scpt |
set clusterName to the text returned of (display dialog "Cluster Name:" default answer "") | cDOT%20Install%20Commands%20(8.1).scpt |
set nodeCount to the text returned of (display dialog "Node Count:" default answer "2") | cDOT%20Install%20Commands%20(8.1).scpt |
set timezone to the text returned of (display dialog "Timezone:" default answer "US/Pacific") | cDOT%20Install%20Commands%20(8.1).scpt |
set ntpServer1 to the text returned of (display dialog "NTP Server #1:" default answer "") | cDOT%20Install%20Commands%20(8.1).scpt |
set ntpServer2 to the text returned of (display dialog "NTP Server #2:" default answer "") | cDOT%20Install%20Commands%20(8.1).scpt |
set mgmtIntClust to the text returned of (display dialog "Cluster Management:" default answer "e0b") | cDOT%20Install%20Commands%20(8.1).scpt |
set mgmtIntNode to the text returned of (display dialog "Node Management:" default answer "e0a") | cDOT%20Install%20Commands%20(8.1).scpt |
set mgmtIntNodeBk to the text returned of (display dialog "Node Management Failover:" default answer "e0b") | cDOT%20Install%20Commands%20(8.1).scpt |
set platform to "32xx" | cDOT%20Install%20Commands%20(8.1).scpt |
set clusterName to "clust" | cDOT%20Install%20Commands%20(8.1).scpt |
set nodeCount to "4" | cDOT%20Install%20Commands%20(8.1).scpt |
set timezone to "US/Pacific" | cDOT%20Install%20Commands%20(8.1).scpt |
set ntpServer1 to "ntp1" | cDOT%20Install%20Commands%20(8.1).scpt |
set ntpServer2 to "ntp2" | cDOT%20Install%20Commands%20(8.1).scpt |
set mgmtIntClust to "e0b" | cDOT%20Install%20Commands%20(8.1).scpt |
set mgmtIntNode to "e0a" | cDOT%20Install%20Commands%20(8.1).scpt |
set mgmtIntNodeBk to "e0M" | cDOT%20Install%20Commands%20(8.1).scpt |
if ("32xx" is in platform) then | cDOT%20Install%20Commands%20(8.1).scpt |
set TenGbEList to {"e1a", "e1b", "e2a", "e2b"} | cDOT%20Install%20Commands%20(8.1).scpt |
else if (platform = "62xx") then | cDOT%20Install%20Commands%20(8.1).scpt |
set TenGbEList to {"e0c", "e0d", "e0e", "e0f"} | cDOT%20Install%20Commands%20(8.1).scpt |
else if (platform = "VSIM") then | cDOT%20Install%20Commands%20(8.1).scpt |
set TenGbEList to {} | cDOT%20Install%20Commands%20(8.1).scpt |
set tmp_string to "000000000" & (value as string) | cDOT%20Install%20Commands%20(8.1).scpt |
set padded_value to characters ((length of tmp_string) - string_length + 1) thru -1 of tmp_string as string | cDOT%20Install%20Commands%20(8.1).scpt |
on search_replace(haystack, needle, replacement) | cDOT%20Install%20Commands%20(8.1).scpt |
set old_delimiters to AppleScript's text item delimiters | cDOT%20Install%20Commands%20(8.1).scpt |
set AppleScript's text item delimiters to needle | cDOT%20Install%20Commands%20(8.1).scpt |
set temp_list to every text item of haystack | cDOT%20Install%20Commands%20(8.1).scpt |
set return_value to temp_list as text | cDOT%20Install%20Commands%20(8.1).scpt |
set AppleScript's text item delimiters to old_delimiters | cDOT%20Install%20Commands%20(8.1).scpt |
return return_value | cDOT%20Install%20Commands%20(8.1).scpt |
end search_replace | cDOT%20Install%20Commands%20(8.1).scpt |
on repeat_cmd_for_list(cmd, placeholder, valuelist) | cDOT%20Install%20Commands%20(8.1).scpt |
set cmdString to "" | cDOT%20Install%20Commands%20(8.1).scpt |
repeat with thisvalue in valuelist | cDOT%20Install%20Commands%20(8.1).scpt |
if cmdString = "" then | cDOT%20Install%20Commands%20(8.1).scpt |
set cmdString to search_replace(cmd, placeholder, thisvalue as string) | cDOT%20Install%20Commands%20(8.1).scpt |
set cmdString to cmdString & " | cDOT%20Install%20Commands%20(8.1).scpt |
" & search_replace(cmd, placeholder, thisvalue as string) | cDOT%20Install%20Commands%20(8.1).scpt |
return cmdString | cDOT%20Install%20Commands%20(8.1).scpt |
end repeat_cmd_for_list | cDOT%20Install%20Commands%20(8.1).scpt |
set TenGbEString to "" | cDOT%20Install%20Commands%20(8.1).scpt |
repeat with thisport in TenGbEList | cDOT%20Install%20Commands%20(8.1).scpt |
if TenGbEString = "" then | cDOT%20Install%20Commands%20(8.1).scpt |
set TenGbEString to thisport | cDOT%20Install%20Commands%20(8.1).scpt |
set TenGbEString to TenGbEString & "|" & thisport | cDOT%20Install%20Commands%20(8.1).scpt |
set ntpCmd to "" | cDOT%20Install%20Commands%20(8.1).scpt |
set fgCmd to "" | cDOT%20Install%20Commands%20(8.1).scpt |
set setNodeFgCmd to "" | cDOT%20Install%20Commands%20(8.1).scpt |
set disableFlowCtlCmd to "" | cDOT%20Install%20Commands%20(8.1).scpt |
set aggrRenameCmd to "" | cDOT%20Install%20Commands%20(8.1).scpt |
set allNodesList to {} | cDOT%20Install%20Commands%20(8.1).scpt |
set oddNodesList to {} | cDOT%20Install%20Commands%20(8.1).scpt |
set evenNodesList to {} | cDOT%20Install%20Commands%20(8.1).scpt |
set nextCmd to "" | cDOT%20Install%20Commands%20(8.1).scpt |
set thisNode to "" | cDOT%20Install%20Commands%20(8.1).scpt |
repeat with n from 1 to nodeCount | cDOT%20Install%20Commands%20(8.1).scpt |
set thisNode to clusterName & "-" & zero_pad(n, 2) | cDOT%20Install%20Commands%20(8.1).scpt |
set end of allNodesList to thisNode | cDOT%20Install%20Commands%20(8.1).scpt |
if n mod 2 is 1 then | cDOT%20Install%20Commands%20(8.1).scpt |
set end of oddNodesList to thisNode | cDOT%20Install%20Commands%20(8.1).scpt |
set end of evenNodesList to thisNode | cDOT%20Install%20Commands%20(8.1).scpt |
set nextCmd to "net int failover-groups create -failover-group cluster_mgmt_fg -node " & thisNode & " -port " & mgmtIntClust | cDOT%20Install%20Commands%20(8.1).scpt |
set fgCmd to fgCmd & " | cDOT%20Install%20Commands%20(8.1).scpt |
" & nextCmd | cDOT%20Install%20Commands%20(8.1).scpt |
set nextCmd to "net int failover-groups create -failover-group node" & zero_pad(n, 2) & "_fg -node " & thisNode & " -port " & mgmtIntNode & " | cDOT%20Install%20Commands%20(8.1).scpt |
net int failover-groups create -failover-group node" & zero_pad(n, 2) & "_fg -node " & thisNode & " -port " & mgmtIntNodeBk & " | cDOT%20Install%20Commands%20(8.1).scpt |
net int modify -vserver " & thisNode & " -lif mgmt1 -home-port " & mgmtIntNode & " -failover-policy nextavail -use-failover-group enabled -failover-group node" & zero_pad(n, 2) & "_fg | cDOT%20Install%20Commands%20(8.1).scpt |
set setNodeFgCmd to setNodeFgCmd & " | cDOT%20Install%20Commands%20(8.1).scpt |
if (n = 1) then | cDOT%20Install%20Commands%20(8.1).scpt |
set nextCmd to "aggr rename -aggregate aggr0 -newname aggr0_" & clusterName & "_" & zero_pad(n, 2) | cDOT%20Install%20Commands%20(8.1).scpt |
set nextCmd to "aggr rename -aggregate aggr0_" & clusterName & "_" & zero_pad(n, 2) & "_0 -newname aggr0_" & clusterName & "_" & zero_pad(n, 2) | cDOT%20Install%20Commands%20(8.1).scpt |
set aggrRenameCmd to aggrRenameCmd & " | cDOT%20Install%20Commands%20(8.1).scpt |
set thisSectionStr to "" | cDOT%20Install%20Commands%20(8.1).scpt |
if (nodeCount = "2") then | cDOT%20Install%20Commands%20(8.1).scpt |
set thisSectionStr to "cluster ha modify -configured true | cDOT%20Install%20Commands%20(8.1).scpt |
" & repeat_cmd_for_list("system node reboot -node <node>", "<node>", allNodesList) | cDOT%20Install%20Commands%20(8.1).scpt |
set thisSectionStr to repeat_cmd_for_list("system node reboot -node <node>", "<node>", oddNodesList) & " | cDOT%20Install%20Commands%20(8.1).scpt |
" & repeat_cmd_for_list("storage failover modify -node <node> -enabled true", "<node>", oddNodesList) & " | cDOT%20Install%20Commands%20(8.1).scpt |
" & repeat_cmd_for_list("system node reboot -node <node>", "<node>", evenNodesList) | cDOT%20Install%20Commands%20(8.1).scpt |
set thisSectionStr to thisSectionStr & " | cDOT%20Install%20Commands%20(8.1).scpt |
cluster ha show | cDOT%20Install%20Commands%20(8.1).scpt |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.