What's new

Script to cd to USB directory on SSH login

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

rdy2

Regular Contributor
Yes, I know is just typing a command, but I rather find myself on my /mnt/usbvol/scripts than on /tmp/home/root. I know there is a chance the drive may not be not mounted, but that should be easy to handled, or worst case let the cd fail...

Does anyone have a script for this? Any ideas?
 
:confused:

So instead of typing "cd /mnt/usbvol/scripts" you prefer to type "/jffs/scripts/myscript.sh".
 
:confused:

So instead of typing "cd /mnt/usbvol/scripts" you prefer to type "/jffs/scripts/myscript.sh".
Yes, the harder the better :)
I should have explained better. I do not want to have to type anything. Make it the root home directory (if mounted)
 
Enable JFFS custom scripts and configs in the GUI and then add this to /jffs/configs/profile.add
Code:
[ -d /tmp/mnt/usbvol/script ] && cd /tmp/mnt/usbvol/scripts
 
You can create a /jffs/configs/profile.add file containing the cd command:

Code:
# cat /jffs/configs/profile.add
alias amtm='/jffs/scripts/amtm' # added by amtm
cd /tmp/mnt/VERBATIM/ASUS
 
Thank you guys, I had the feeling there had to be a provision to "externalize" profile...
 

Similar threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top