January 9, 200917 yr Author OK this is driving me crazy and im sure it will be something silly. #!/bin/sh cp /boot/scripts/.bashrc /root/ source /root/.bashrc hardly rocket science right.... run it nada. run each line manually works fine. Tried #!/bin/sh, #!/bin/bash, #!/usr/bin/bash someone put me out my mysery
January 10, 200917 yr OK this is driving me crazy and im sure it will be something silly. #!/bin/sh cp /boot/scripts/.bashrc /root/ source /root/.bashrc hardly rocket science right.... run it nada. run each line manually works fine. Tried #!/bin/sh, #!/bin/bash, #!/usr/bin/bash someone put me out my mysery The source only runs for the duration of the #!/bin/sh process, it is not permanant. Are you trying to have a .bashrc for every login process? If so you can set the ENV variable in the .profile. What is the goal here?
January 10, 200917 yr Author The goal is two fold. 1. Understand why the simple script doesnt even copy. 2. Install my custom .bashrc ta
January 29, 201115 yr To install (assumes you have wget, if you dont then copy it up and move it manually) cd ~ wget http://unraid.yi.org/addons/bashrc.txt mv bashrc.txt .bashrc . .bashrc This file is no longer available... 401 Unauthorized Page shows... This site is running TeamViewer. Free Port 80 for other applications in advanced settings. Any chance we can get an updated link for this? Is there another thread that I missed? I still don't see anything like this implemented in 4.7 or in unMENU, but would be very useful.
March 11, 201214 yr Author What am I missing. I wen to back to mess with .bashrc Everything works as expected within a single session but next time I ssh in the .bashrc is not in use. In simple terms i want to load a .bashrc for the root user via the go script and have it stick
March 11, 201214 yr What am I missing. I wen to back to mess with .bashrc Everything works as expected within a single session but next time I ssh in the .bashrc is not in use. In simple terms i want to load a .bashrc for the root user via the go script and have it stick Simple. Create your .bashrc script. Put a copy of it on your flash drive in the /boot directory Then, in the "config/go" script add a line cp /boot/.bashrc /root/.bashrc That should do it. You might also need to set the permissions on the /root/.bashrc file. If so, just add an additional line (after the "cp" command to the config/go script) chmod 644 /root/.bashrc Joe L.
March 11, 201214 yr Author Still no joy: cp /boot/config/.bashrc /root/.bashrc chmod 644 /root/.bashrc I am running this from the shell since i don't want to reboot to test but that shouldn't make a difference.? However if i this once i am SSH'd in it works source ~/.bashrc But having to run that each time is a chore that should be avoidable
March 13, 201214 yr Author Edited my post since the wording made it look like it was working... which it isnt
March 14, 201214 yr Edited my post since the wording made it look like it was working... which it isnt See here: http://stackoverflow.com/questions/820517/bashrc-at-ssh-login and here: https://www.google.com/search?q=ssh+.bashrc Joe L.
March 14, 201214 yr Author Joe you are a star.! Isnt it always the simple things that cause the most problems Tom this is probably worth adding to unRAID proper along with a simple .bashrc user can edit
March 21, 201214 yr All this looks very interesting. I know a little about linux and the commands that come with it, a little more with command prompt, but I feel I've barely even scratched the surface with linux now! I suppose I'll be reading as much as possible, as well as reading up on python. If only I could think of something simple I could actually use to get me to learn python! Back when I was on MIRC all the time I picked up that scripting language pretty well. Learning python just seems so very useful!
November 20, 20169 yr I would rather use .bash_profile instead of .bashrc -> principe is similar but you no need to source it: [*]make a copy of your existing .bash_profile to /boot/.bash_profile [*]edit /boot/.bash_profile - add your desired aliases there [*]add this line to /boot/config/go script: cp /boot/.bash_profile /root/.bash_profile
Archived
This topic is now archived and is closed to further replies.