Skip to main content
Question

Issues with Time machine script.

  • July 15, 2008
  • 7 replies
  • 24 views

Eyoung
Forum|alt.badge.img+10

First off, hello all. Casper n00b here.

I have a script that is supposed to set a defaults write for that annoying time machine message whenever you plug in a drive. it does not seem to be working for me when it is deployed with an image. does it have to go as a separate login/logout policy instead? Find the text of the script below.

#!/bin/sh

/usr/bin/defaults write /Network/Servers/student.thayer.org/Volumes/ STUHOMEDIR/STUDENTHOME/$3/Library/Preferences/com.apple.TimeMachine DoNotOfferNewDisksForBackup -bool yes

/usr/bin/defaults write /Network/Servers/faculty.thayer.org/Volumes/ FACHOMEDIR/FACULTYHOME/$3/Library/Preferences/com.apple.TimeMachine DoNotOfferNewDisksForBackup -bool yes

/usr/bin/defaults write /Users/$3/Library/Preferences/ com.apple.TimeMachine DoNotOfferNewDisksForBackup -bool yes

7 replies

Forum|alt.badge.img+23
  • Valued Contributor
  • July 15, 2008

Two tips:

  1. Make sure that in your configuration, this script is set to run 'At reboot' rather than 'before' or 'after'. If you run the script 'after', you're running it on the utility drive you're booted to during the imaging process. 'At reboot' will add your script to the Casper first run script which will be executed the first time you boot the newly imaged system.
  2. You can simplify your script to: defaults write /Library/Preferences/com.apple.TimeMachine DoNotOfferNewDisksForBackup -bool YES

This will put the setting in the /Library folder, which is applied to all
users.

Hope this helps.


Eyoung
Forum|alt.badge.img+10
  • Author
  • Contributor
  • July 15, 2008

It is not. it is currently setup to run after a machine is imaged. Now that I write this out that logic seems rather flawed....

seems at login and once per user would be the right way to set that up.


Forum|alt.badge.img+21
  • Contributor
  • July 15, 2008

I have this setting as part of a package that has all the user settings we change that is deployed at imaging time with Fill User Templates. Running it at logon should be another way to tackle this as Criss suggests.

Craig


Eyoung
Forum|alt.badge.img+10
  • Author
  • Contributor
  • July 15, 2008

Casper is set to run login hooks...or seems to be as some of my login scripts are working (bind OD, etc...)

it is at least good to get confirmation the script itself is valid.. I will break it off and see if I can get it to run as a login more reliably

Eric Young
eyoung at thayer.org
781-664-2286


Eyoung
Forum|alt.badge.img+10
  • Author
  • Contributor
  • July 15, 2008

oh excellent. It is currently set per user... and as after. I will adjust this.


John_Wetter
Forum|alt.badge.img+33
  • Hall of Fame
  • July 15, 2008

I don't think it matters in this case, but you can shorten the script up even more to:
defaults write com.apple.timemachine DoNotOfferNewDisksForBackup -bool YES


Forum|alt.badge.img+21
  • Contributor
  • July 15, 2008

That's what I've used.

Craig