Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Dec 2010 14:04:06 +0000
From:      krad <kraduk@gmail.com>
To:        Christer Solskogen <christer.solskogen@gmail.com>
Cc:        freebsd-questions@freebsd.org, Da Rock <freebsd-questions@herveybayaustralia.com.au>
Subject:   Re: A jail with a dash in its name
Message-ID:  <AANLkTikpgFJ3oNLGTtG_BhGvEPE3sg=Z6g06R2cvDMr1@mail.gmail.com>
In-Reply-To: <AANLkTim1DRBBQ84RgsqS5VQn0rJ17RnOLeZbyVUR3MiU@mail.gmail.com>
References:  <201012211211.oBLCBbJW007155@mail.r-bonomi.com> <AANLkTinG7mhdCTMzOUuAygSz0mULhYrUTbRE2qT5VyHC@mail.gmail.com> <4D10A393.2030008@herveybayaustralia.com.au> <AANLkTim1DRBBQ84RgsqS5VQn0rJ17RnOLeZbyVUR3MiU@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 21 December 2010 13:21, Christer Solskogen
<christer.solskogen@gmail.com>wrote:

> On Tue, Dec 21, 2010 at 1:54 PM, Da Rock
> <freebsd-questions@herveybayaustralia.com.au> wrote:
>
> > However, whether or not a hyphen is allowed in the jail name is another
> > matter. Yes a hyphen is allowed in a hostname, but in the rc.conf the
> > hostname is set in a string (as mentioned before). Also, the jail name
> and
> > hostname don't need to be the same thing.
>
> Hence my email :-)
>
> This is how my rc.conf looks now:
> #jail configuration for forest-friend
> jail_forest-friend_rootdir="/usr/jails/forest-friend"
> jail_forest-friend_hostname="forest-friend"
> jail_forest-friend_ip="192.168.0.15"
>
> But still:
> [root@cheer /usr/local/share/jailcfg/templates/default/etc]#
> /etc/rc.d/jail
> /etc/rc.conf: jail_forest-friend_rootdir=/usr/jails/forest-friend: not
> found
> jail_forest-friend_hostname=forest-friend: not found
> jail_forest-friend_ip=192.168.0.15: not found
> Usage: /etc/rc.d/jail [fast|force|one](start|stop|restart|rcvar)
>
> --
> chs,
> _______________________________________________
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "
> freebsd-questions-unsubscribe@freebsd.org"
>

Its a shell limitation, neither bash or sh allow '-' as a valid character in
a variable name

$ sh
$ test-car="test"
test-car=test: not found
$ test\car="test"
testcar=test: not found
$ test\\-car="test"
test\-car=test: not found



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTikpgFJ3oNLGTtG_BhGvEPE3sg=Z6g06R2cvDMr1>