Re: Any way to have login output AND use rsync/scp ?
On Mon, 2 May 2011 02:13:17 +0200, Polytropon wrote: > On Sun, 1 May 2011 15:58:45 -0700 (PDT), George Sanders > wrote: > > I have my .cshrc file run some basic netstat and 'w' commands so that when > > I log > > in, I can see at a glance what is going on on the system and notice any > > unusual > > login activity, etc. > > > > However this completely breaks both scp and rsync - they cannot function at > > all > > (apparently) with any kind of stdio output from the shell. > > > > Is there any way around this ? > > > Create a file ~/.login and put your commands (in sh syntax, > not csh) there. This file will only be executed at interactive > logins. See "man csh", section FILES for details. Sorry, wrote before thinking. :-) Of course ~/.login is csh syntax, as I would guess after (missed to) read the file's header which states: # .login - csh login script, read by login shell, after `.cshrc' at login. # see also csh(1), environ(7). So simply moving your commands from .cshrc to .login should be fully sufficient. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Any way to have login output AND use rsync/scp ?
On Sun, 1 May 2011 15:58:45 -0700 (PDT), George Sanders wrote: > I have my .cshrc file run some basic netstat and 'w' commands so that when I > log > in, I can see at a glance what is going on on the system and notice any > unusual > login activity, etc. > > However this completely breaks both scp and rsync - they cannot function at > all > (apparently) with any kind of stdio output from the shell. > > Is there any way around this ? Create a file ~/.login and put your commands (in sh syntax, not csh) there. This file will only be executed at interactive logins. See "man csh", section FILES for details. > Is there some way to specify an alternate login shell when I use scp or rsync > ? I'm sure the login shell has to be defined by the system, usually by the /etc/passwd file, field "shell"; therefore see "man 5 passwd". > Or conversely: > > Is there some way for my login shell (csh) to notice that it is scp or rsync > accessing the system, and skip the text output for them ? I don't think so, but it should work fine when you move the commands out of the shell configuration file (which is also read by script shells AND interactive shells) to the login startup file (which is only executed if the shell is an interactive login shell). -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Any way to have login output AND use rsync/scp ?
> Date: Sun, 1 May 2011 15:58:45 -0700 (PDT) > From: George Sanders > Subject: Any way to have login output AND use rsync/scp ? > > I have my .cshrc file run some basic netstat and 'w' commands so that > when I log in, I can see at a glance what is going on on the system and > notice any unusual login activity, etc. > > However this completely breaks both scp and rsync - they cannot function > at all > (apparently) with any kind of stdio output from the shell. > > Is there any way around this ? > > Is there some way to specify an alternate login shell when I use scp or > rsync ? > > Or conversely: > > Is there some way for my login shell (csh) to notice that it is scp or > rsync accessing the system, and skip the text output for them ? > > Thanks. > ___ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions To > unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org" > ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Any way to have login output AND use rsync/scp ?
I have my .cshrc file run some basic netstat and 'w' commands so that when I log in, I can see at a glance what is going on on the system and notice any unusual login activity, etc. However this completely breaks both scp and rsync - they cannot function at all (apparently) with any kind of stdio output from the shell. Is there any way around this ? Is there some way to specify an alternate login shell when I use scp or rsync ? Or conversely: Is there some way for my login shell (csh) to notice that it is scp or rsync accessing the system, and skip the text output for them ? Thanks. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"