Posted on 11-08-2011 02:55 AM
Hi,
we've been using a script to move the user accounts to a different
partition.
#!/bin/sh
mv /Users /Volumes/Accounts
chown root:wheel /Volumes/Accounts/Users
chmod 755 /Volumes/Accounts/Users
rm -rf /Users
ln -s /Volumes/Accounts/Users /Users
All of a sudden it's stopped working.
We ran the script at build time and it doesn't actually do anything.
If we then push it out via Casper Remote it fails with this error...
Script Result:shell-init: error retrieving current directory: getcwd:
cannot access parent directories: No such file or
directoryjob-working-directory:
error retrieving current directory: getcwd: cannot access parent
directories: No such file or directoryUnmounting file server...shell-init:
error retrieving current directory: getcwd: cannot access parent
directories: No such file or directoryjob-working-directory: error
retrieving current directory: getcwd: cannot access parent directories: No
such file or directoryshell-init: error retrieving current directory:
getcwd: cannot access parent directories: No such file or
directoryjob-working-directory:
error retrieving current directory: getcwd: cannot access parent
directories: No such file or directory
However, it does actually work?
Not ideal to run it after the mac is built and I'm wondering why it would
suddenly fail during build as nothing has changed with regards to our build
images since it last worked.
Any ideas/help appreciated.
-- Regards,
Al Platt
Imagination IT
Los Angeles · Detroit · Toronto · New York · London · Cologne · Stockholm ·
Singapore · Hong Kong · Shanghai · Tokyo · Sydney
Imagination · London
25 Store Street South Crescent, London WC1E 7BL, United Kingdom
Tel +44 20 7323 3300 Fax +44 20 7462 2837
www.imagination.com
Posted on 11-08-2011 06:54 AM
why not mount your accounts/Users disk at /Users by creating an /etc/fstab file, and making sure a /Users/Shared exists at boot time?
fstab should look something like this, assuming your disk is labeled accounts.
#
# Warning - this file should only be modified with vifs(8)
#
# Failure to do so is unsupported and may be destructive.
#
LABEL=Accounts /Users hfs rw 1 0
--
Todd Ness
Technology Consultant/Non-Windows Services
Americas Regional Delivery Engineering
HP Enterprise Services
Posted on 05-19-2021 02:47 PM
this is a way old post but for anyone who googled this error while creating a pkg and Jamf this is where you're taken
SOLUTION:
your #!/bin/bash doesn't have a space in it (like the original poster's doesnt)
it should be:
**
#! /bin/bash
**
(with a space between the ! and the /)
That should solve why your pre/postinstall scripts say they're compiling incorrectly in Composer