[ previous ] [ next ] [ threads ]
 
 From:  Michael Sierchio <kudzu at tenebras dot com>
 To:  Anders Hagman <anders dot hagman at netplex dot se>
 Cc:  m0n0wall at lists dot m0n0 dot ch
 Subject:  Re: [m0n0wall] Alias address and DHCP
 Date:  Thu, 11 Aug 2011 10:10:02 -0700
Sorry, failed to read the context properly - m0n0wall!  Ha!  Well, if
you ever want to do this on a naked FreeBSD box... ;-)

On Thu, Aug 11, 2011 at 10:05 AM, Michael Sierchio <kudzu at tenebras dot com> wrote:
> Hej, Anders -
>

> /usr/local/etc/rc.d (more properly).
>
> in /etc/rc.conf you'll need to set dhclient-alias_enable="YES", and
> the other variables too
>
> dhclient-alias_if
> dhclient-alias_addr
> dhclient-alias_mask
>
> - M
>
> #!/bin/sh
> #

>
> # PROVIDE: dhclient-alias
> # KEYWORD: nojail nostart
> # REQUIRE: dhclient
>
> . /etc/rc.subr
> . /etc/network.subr
>
> name="dhclient-alias"
> start_cmd="dhclient-alias_start"
> stop_cmd="dhclient-alias_stop"
>
> dhclient-alias_start()
> {

> $dhclient-alias_mask alias
> }
>
> dhclient-alias_stop()
> {

> }
>
>
> load_rc_config $name
>
> dhclient-alias_if=${dhclient-alias_if:-eth0}
> dhclient-alias_addr=${dhclient-alias_if:-192.168.0.123}
> dhclient-alias_mask=${dhclient-alias_if:-255.255.255.255}
>
> run_rc_command "$1"
>