On 2010-02-25T12:32:50, Dejan Muhamedagic <deja...@fastmail.fm> wrote:
> > How would I match two hostnames: > > > > host_a='shrek' host_b='shrek ' > > > > I don't know how to do that without RE in shell. I'll gladly change > > my stupid solution. I didn't say your solution was stupid, I was actually agreeing with you ;-) > You can try: > > is_hostname_in_list() { > for h in $VAR; do > [ "$h" = "$HOSTNAME" ] && return 0 > done > return 1 > } The RA also should make sure that the list only contains one value. But yes, this should work. Regards, Lars -- Architect Storage/HA, OPS Engineering, Novell, Inc. SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) "Experience is the name everyone gives to their mistakes." -- Oscar Wilde _______________________________________________________ Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev Home Page: http://linux-ha.org/