Announcement

Collapse
No announcement yet.

Mounting items conditionally

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Mounting items conditionally

    I was wondering if it is possible to mount some items at login conditionally based on the ip address of my laptop? What I want to do is if I am not on my home network, then I want to have all the same mount points under my Home directory but I want to mount them using sshfs. If I am inside my home network then I want to mount these points normally.

    So I have a script that I can run that will grab my ip address, once that is done I guess I could just un-mount those specific mount points and then re-mount using sshfs, but is this the best way to do this? How can I make this script run every time I login on the laptop?

    Is there anyway to do any of this without having to type in a sudo password on each login?

    Thanks for any suggestions.

    -Eric
Working...
X