Giter VIP home page Giter VIP logo

automount's People

Contributors

gniemetz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

automount's Issues

Couple problems with ${USER}, ${HOME}, ${LOGINNAME}, etc.

On MacOS Sierra, not sure about previous or other versions...

But line 346 of automount.sh calls:
CommonMaxRetryInSeconds="$(/usr/libexec/PlistBuddy -c "Print CommonMaxRetryInSeconds" "${AUTOMOUNTPLIST_AFN}" 2>/dev/null)"

Which references:
declare -r AUTOMOUNTPLIST_AFN="${USERHOME}/Library/Preferences/it.niemetz.automount.plist"

${USERHOME} on my system is blank.

So I changed to:
declare -r AUTOMOUNTPLIST_AFN="${HOME}/Library/Preferences/it.niemetz.automount.plist"

This works correctly.

I ended up doing a global replace on all occurrences, now it works great.

I ran this manually to see what the output was: (With ${HOME} it works properly.)
/usr/libexec/PlistBuddy -c "Print CommonMaxRetryInSeconds" "${HOME}/Library/Preferences/it.niemetz.automount.plist"

Understanding the configuration

In the "automount.sh" file, there are two sections at the beginning that refer to what looks like two files. Is the correct procedure, to copy/paste these commented blocks and paste them as new files in the respective locations, then edit them, then copy automout.sh to its correct location, chmod it, then it should run fine? Is that correct? Just missing a little documentation as to the configuration.

Mount commands in the script may need to be changed for Sierra 10.12.3

I had to modify line 419 to get smb mounting to work because the command seems to be mount_smbfs (not mount_smb).

$ mount_
mount_acfs mount_apfs mount_cddafs mount_exfat mount_ftp mount_msdos mount_ntfs mount_udf
mount_afp mount_cd9660 mount_devfs mount_fdesc mount_hfs mount_nfs mount_smbfs mount_webdav

Line 284: declare: PPID: readonly variable

Hi.
If i manual start automount 0.90.17 I have this error:

bin$ sudo /usr/local/bin/automount.sh -m
/usr/local/bin/automount.sh: line 284: declare: PPID: readonly variable
mount of CONDIVISE failed (RC=1, RV=)
automount runned with errors.

The same without sudo

launchctl status code 1

Hello,

Im trying to get this running although the service doesnt seem to start as it should, with a status code 1.

ls -l ~/Library/LaunchAgents/it-niemets.automount.plist shows:

-rw-r--r--@ 1 dred staff 847 Jun 19 13:45 /Users/restofthepath to /Lib/LaunchAgents/it-niemets.automount.plist

Could someone please help me further?

Need help

Hi,
I'm trying to use your script.
I got notification: 2017-03-16 16:41:21 +0100|46628|Info|All shares mountd successfully
But in fact nothing was mounted.
Please don't you have a preference file for sample ?
Thanks

Any issues with macOS High Sierra?

Firstly, wanted to report that I have been successfully using this on multiple Macs, and it works like a treat. Thank you @gniemetz and other contributors.

Currently I am using this on macOS Sierra. Before upgrading to High Sierra, I wanted to find out if I have to anticipate any issues? Is anyone using this with High Sierra?

Thanks

Support for the Domain username

My NAS is in a Domain so my username when I mount a share is something like domain\username.
but when i configure my .plist with something like

<key>Account</key> <string>mydomain\myusername</string>

I have this error

bash-3.2$ /usr/local/bin/automount.sh -m /Users/********/Library/Preferences/it.niemetz.automount.plist or /Users/********/Library/Keychains/login.keychain are missing bash-3.2$ chown ${USER}:staff /usr/local/bin/automount.sh

I think that special characters like \ and @ aren't support for login name, is something similar of the "bug" of sadrian80 with the special characters in the password,

automount triggered randomly

Hello Gerd

After using automount for two days on my machines, I see it triggered a little too often.
One machine is an iMac connected solely via Ethernet, the second one is a Macbook.

While the main events for triggering seem to work fine (change of network, reboot, waking from sleep (?)), automount gets triggered while nothing changes. I can't see a pattern, it seems randomly. Sometimes multiple times in a row.

Are the events that trigger the script logged? Can we see what happens there?

Expect scripts return exit code 0 even if command failed

In a number of spots in automount.sh an expect script has the following statement:

eof {
    return
}

I've discovered that this ignores e.g. authentication errors thrown by commands like mount_smbfs. The fix for me to let the exit status fall through was to replace the above statement by just:

eof

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.