Add FreeBSD support

Reported by Martin on 2009-11-03
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
mysql-mmm
Medium
Pascal Hofmann

Bug Description

diff -r mysql-mmm-2.0.10/lib/Agent/Helpers/Network.pm mysql-mmm-freebsd/lib/Agent/Helpers/Network.pm
9c9,10
< if ($OSNAME eq 'linux') {
---
> if ($OSNAME eq 'linux' || $OSNAME eq 'freebsd') {
> # these libs will always be loaded, use require and then import to avoid that
34c35
<
---
>
44a46,49
> elsif ($OSNAME eq 'freebsd') {
> $output = `/sbin/ifconfig $if | grep inet`;
> _exit_error("Could not check if ip $ip is configured on $if: $output") if ($? >> 8 == 255);
> }
62c67
<
---
>
77a83,86
> elsif ($OSNAME eq 'freebsd') {
> $output = `/sbin/ifconfig $if inet $ip netmask 255.255.255.255 alias`;
> _exit_error("Could not configure ip $ip on interface $if: $output") if ($? >> 8 == 255);
> }
94c103
<
---
>
103a113,116
> elsif ($OSNAME eq 'freebsd') {
> $output = `/sbin/ifconfig $if inet $ip -alias`;
> _exit_error("Could not remove ip $ip from interface $if: $output") if ($? >> 8 == 255);
> }
120,121c133,134
<
< if ($OSNAME eq 'linux') {
---
>
> if ($OSNAME eq 'linux' || $OSNAME eq 'freebsd') {

Changed in mysql-mmm:
assignee: nobody → Pascal Hofmann (pascalhofmann)
importance: Undecided → Medium
status: New → Confirmed
Pascal Hofmann (pascalhofmann) wrote :

Please attach the diff file, copy and paste from the bug description does not work.

Changed in mysql-mmm:
status: Confirmed → Incomplete
Martin (mwb311) wrote :

FreeBSD support

Pascal Hofmann (pascalhofmann) wrote :

Thx

Changed in mysql-mmm:
status: Incomplete → In Progress
Changed in mysql-mmm:
status: In Progress → Fix Committed
Changed in mysql-mmm:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers