Re: OT LaunchDaemon
On Sat, Oct 1, 2016 at 11:43 PM, James Linder wrote: > Over the years I’ve seen many clever people here, perchance one of them will > cast an eye and say THERE . . . > > I’m trying to run a rc.local at start up > I created a launchdaemon > Last I checked I think I saw supervisor in MacPorts. With some simple config supervisor works really well and it really simple (haven't tested MacPorts version though). Best, Alejandro Imass ___ macports-users mailing list macports-users@lists.macosforge.org https://lists.macosforge.org/mailman/listinfo/macports-users
Re: OT LaunchDaemon
> On Oct 1, 2016, at 11:43 PM, James Linder wrote: > > Over the years I’ve seen many clever people here, perchance one of them will > cast an eye and say THERE . . . > > I’m trying to run a rc.local at start up > I created a launchdaemon > > haycorn:jam root# cat /Library/LaunchDaemons/local.startup.plist > > "http://www.apple.com/DTDs/PropertyList-1.0.dtd";> > > >Label local.startup >Disabled >RunAtLoad >KeepAlive >LaunchOnlyOnce >ProgramArguments > > /bin/bash > -c >/etc/rc.local > > > > > It does not run. Following the launchd.info->troubleshooting www everything > does run without complaint. > (Im creating a ramdisk, but what ever is in rc.local) > haycorn:jam root# ls -l /etc/rc.local > -rwxr-xr-x 1 root wheel 108 2 Oct 09:58 /etc/rc.local > haycorn:jam root# cat /etc/rc.local > #!/bin/bash > > DISK_ID=$(hdiutil attach -nomount ram://204800) > diskutil erasevolume HFS+ "ramdisk" ${DISK_ID} > > I’ve tried specifing Program and 644 permissions on rc.local [Try again using the righ email.] I’m no expect, but I don’t think you need the “-c” parameter. You already have a reference to a file. You may also want to add keys to direct stdout and stderr to a file. Ala: StandardOutPath /tmp/test.stdout StandardErrorPath /tmp/test.stderr I think the following web site is pretty good at explaining how to use launchd plists: http://launchd.info You can also check ‘man launchd.plist’ for a reference. Craig ___ macports-users mailing list macports-users@lists.macosforge.org https://lists.macosforge.org/mailman/listinfo/macports-users
Re: OT LaunchDaemon
On Sun, Oct 2, 2016 at 12:10 AM, James Linder wrote: > > as the magistrate says “that has a ring of truth to it” > It does not quite work for me (I ran launchctl not launchd) but it > certainly will lead to the solution so thanks again bleh. sorry, spending too much time on linux these days, it is launchctl indeed. Beyond that all I could have suggested was logging the output from the script to see if any useful errors were coming up, and/or checking Console.app. -- brandon s allbery kf8nh sine nomine associates allber...@gmail.com ballb...@sinenomine.net unix, openafs, kerberos, infrastructure, xmonadhttp://sinenomine.net ___ macports-users mailing list macports-users@lists.macosforge.org https://lists.macosforge.org/mailman/listinfo/macports-users
Re: OT LaunchDaemon
On 2 Oct 2016, at 11:53 AM, Brandon Allbery wrote: > > > On Sat, Oct 1, 2016 at 11:43 PM, James Linder wrote: > I’m trying to run a rc.local at start up > I created a launchdaemon > > Did you load it? In 10.5 the keys in the launchd plist were sufficient, but > this made per-user launchd config difficult; later versions store the > "enabled" bit in per-uid databases (including for root) and require you to > manipulate that database: > > launchd load -w /Library/LaunchDaemons/local.startup.plist > > The -w is what updates the database so it will load on subsequent boots. > > I've created several local launchd plists that way, and they work as long as > I have specified any dependencies properly (i.e. making sure any needed > subsystems are running; the only one that comes to mind for yours is probably > diskarbitrationd, but I don't know offhand how you specify a dependency on > it). Brandon many thanks as the magistrate says “that has a ring of truth to it” It does not quite work for me (I ran launchctl not launchd) but it certainly will lead to the solution so thanks again James ___ macports-users mailing list macports-users@lists.macosforge.org https://lists.macosforge.org/mailman/listinfo/macports-users
Re: OT LaunchDaemon
On Sat, Oct 1, 2016 at 11:43 PM, James Linder wrote: > I’m trying to run a rc.local at start up > I created a launchdaemon > Did you load it? In 10.5 the keys in the launchd plist were sufficient, but this made per-user launchd config difficult; later versions store the "enabled" bit in per-uid databases (including for root) and require you to manipulate that database: launchd load -w /Library/LaunchDaemons/local.startup.plist The -w is what updates the database so it will load on subsequent boots. I've created several local launchd plists that way, and they work as long as I have specified any dependencies properly (i.e. making sure any needed subsystems are running; the only one that comes to mind for yours is probably diskarbitrationd, but I don't know offhand how you specify a dependency on it). -- brandon s allbery kf8nh sine nomine associates allber...@gmail.com ballb...@sinenomine.net unix, openafs, kerberos, infrastructure, xmonadhttp://sinenomine.net ___ macports-users mailing list macports-users@lists.macosforge.org https://lists.macosforge.org/mailman/listinfo/macports-users
OT LaunchDaemon
Over the years I’ve seen many clever people here, perchance one of them will cast an eye and say THERE . . . I’m trying to run a rc.local at start up I created a launchdaemon haycorn:jam root# cat /Library/LaunchDaemons/local.startup.plist http://www.apple.com/DTDs/PropertyList-1.0.dtd";> Label local.startup Disabled RunAtLoad KeepAlive LaunchOnlyOnce ProgramArguments /bin/bash -c /etc/rc.local It does not run. Following the launchd.info->troubleshooting www everything does run without complaint. (Im creating a ramdisk, but what ever is in rc.local) haycorn:jam root# ls -l /etc/rc.local -rwxr-xr-x 1 root wheel 108 2 Oct 09:58 /etc/rc.local haycorn:jam root# cat /etc/rc.local #!/bin/bash DISK_ID=$(hdiutil attach -nomount ram://204800) diskutil erasevolume HFS+ "ramdisk" ${DISK_ID} I’ve tried specifing Program and 644 permissions on rc.local Can anyone help? Thanks James ___ macports-users mailing list macports-users@lists.macosforge.org https://lists.macosforge.org/mailman/listinfo/macports-users