Help - Search - Members - Calendar
Full Version: Use applescript to edit kexts?
InsanelyMac Forum > Apple World > Mac Programming and Development > AppleScript and Automator
idividebyzero
Can you use Applescript to edit kexts?

I know you can open terminal and run a command, but what happens when you sudo and have to verify the password? Does it just popup so you can enter the password and then go on its merry way?

I believe there is a way to get terminal to change lines of text without having you manually select them with pico, is this correct? Ive seen people use "sudo perl" to automate the whole kext process which seems to replace certain strings by typing something like: 's/0x11111/0x22222/g'

CODE
Tell Application "Terminal"
Activate
do script "sudo perl -pi -e 's/xx/xx/g' /system/etc"
end tell


Would that edit kexts? Im mostly confused about the perl commands, Ive only seen it in certain threads, I havent actually been able to use it with my hardware.
asap18
If you want something to run as a root user so you dont need to give the password you can use setuid to root on the script.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.