From 6e6e2d4ef4fa9fb216d8c0058e394a0df3e348f9 Mon Sep 17 00:00:00 2001 From: Steve Yuroff Date: Fri, 22 Jan 2016 13:30:15 -0600 Subject: [PATCH 1/2] Dropping the script in outset's on-demand function (and invoking it via touching /private/tmp/.com.github.outset.ondemand.launchd in the postinstall) makes the plist update happen immediately vs on next boot. I saw issues when both the update script and Outset were trying to modify ~/Library/Preferences/com.github.outset.plist --- scriptRunnerToOutset/Makefile | 7 ++++--- scriptRunnerToOutset/postinstall | 5 +++++ 2 files changed, 9 insertions(+), 3 deletions(-) create mode 100755 scriptRunnerToOutset/postinstall diff --git a/scriptRunnerToOutset/Makefile b/scriptRunnerToOutset/Makefile index bac9155..9d816d9 100644 --- a/scriptRunnerToOutset/Makefile +++ b/scriptRunnerToOutset/Makefile @@ -3,12 +3,13 @@ include /usr/local/share/luggage/luggage.make TITLE=scriptRunnerToOutset REVERSE_DOMAIN=com.grahamgilbert PAYLOAD= \ - pack-usr-local-outset-login-once-01-scriptRunnerToOutset_user_plist.py + pack-script-postinstall \ + pack-usr-local-outset-on-demand-01-scriptRunnerToOutset_user_plist.py l_usr_local_outset: l_usr_local - @sudo mkdir -p ${WORK_D}/usr/local/outset/{firstboot-packages,firstboot-scripts,everyboot-scripts,login-every,login-once} + @sudo mkdir -p ${WORK_D}/usr/local/outset/{boot-once,boot-every,login-once,login-every,on-demand,share,FoundationPlist} @sudo chown -R root:wheel ${WORK_D}/usr/local/outset @sudo chmod -R 755 ${WORK_D}/usr/local/outset pack-usr-local-outset-login-once-%: % l_usr_local_outset - @sudo ${INSTALL} -m 755 -g wheel -o root "${<}" ${WORK_D}/usr/local/outset/login-once \ No newline at end of file + @sudo ${INSTALL} -m 755 -g wheel -o root "${<}" ${WORK_D}/usr/local/outset/login-once diff --git a/scriptRunnerToOutset/postinstall b/scriptRunnerToOutset/postinstall new file mode 100755 index 0000000..fade9ea --- /dev/null +++ b/scriptRunnerToOutset/postinstall @@ -0,0 +1,5 @@ +#!/bin/sh + +touch /private/tmp/.com.github.outset.ondemand.launchd + +exit 0 \ No newline at end of file From 232060a031c0faf161a4fb9da2f109cd9965ec06 Mon Sep 17 00:00:00 2001 From: Steve Yuroff Date: Fri, 22 Jan 2016 15:49:42 -0600 Subject: [PATCH 2/2] Changes when scriptRunnerToOutset is run from login-once to on-demand and executes on-demand: this works around a problem of Outset and the script it's running both trying to update com.github.once.plist Presumes /usr/local/share/luggage/luggage.local has it's own block of Outset definitions. --- scriptRunnerToOutset/Makefile | 7 ------- 1 file changed, 7 deletions(-) diff --git a/scriptRunnerToOutset/Makefile b/scriptRunnerToOutset/Makefile index 9d816d9..a1f8af2 100644 --- a/scriptRunnerToOutset/Makefile +++ b/scriptRunnerToOutset/Makefile @@ -6,10 +6,3 @@ PAYLOAD= \ pack-script-postinstall \ pack-usr-local-outset-on-demand-01-scriptRunnerToOutset_user_plist.py -l_usr_local_outset: l_usr_local - @sudo mkdir -p ${WORK_D}/usr/local/outset/{boot-once,boot-every,login-once,login-every,on-demand,share,FoundationPlist} - @sudo chown -R root:wheel ${WORK_D}/usr/local/outset - @sudo chmod -R 755 ${WORK_D}/usr/local/outset - -pack-usr-local-outset-login-once-%: % l_usr_local_outset - @sudo ${INSTALL} -m 755 -g wheel -o root "${<}" ${WORK_D}/usr/local/outset/login-once