pre-post login script (was Re: RANCID's fantastic!)
Andrew Fort
afort at choqolat.org
Sun Dec 7 10:41:42 UTC 2003
john heasley wrote:
>What if there were a "pre-login" (and perhaps post-disconnect) script (akin
>to clogin -s), specified/identified by cloginrc? for example,
>
>add loginscript router* {/usr/local/share/cisco-cons.exp}
>add logoutscript router* {/usr/local/share/cisco-cons-disco.exp}
>
>I suspect that both (any) of these would have to meet some expectations of
>*login. I'm not sure exactly what those might be, just a nagging thought
>in the back of the brain.
>
>
The main change as I see it would be required in the logoutscript, since
if I read this correctly, the end of each router.
} else {
label $router
log_user 1
interact
}
# End of for each router
wait
sleep 0.3
}
exit 0
The "interact" ends when the session closes? (i.e., after we might need
to do some bits with the script). Looks straightforward if we're
already running a script (-s), however.
>I believe what afort referred to in his mail was the idea of having a
>"pre-login" command directive in cloginrc. An idea which would be replaced
>by this.
>
>
Yep, that's what I was getting at. The type of hook you suggest sounds
like a better option.
-afort
More information about the Rancid-discuss
mailing list