machines: back: switch ConnectX-3 ports to ethernet mode on boot
Signed-off-by: Christoph Heiss <christoph@c8h4.io>
This commit is contained in:
parent
fe5310c72f
commit
b98a8e47e2
|
@ -69,4 +69,14 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
services.openssh.settings.AllowUsers = [ "backup" ];
|
services.openssh.settings.AllowUsers = [ "backup" ];
|
||||||
|
|
||||||
|
systemd.services.switch-mlx4-ports-to-eth = {
|
||||||
|
serviceConfig.Type = "oneshot";
|
||||||
|
description = "switch Mellanox ConnectX-3 Pro ports to ethernet mode";
|
||||||
|
script = ''
|
||||||
|
echo eth >/sys/bus/pci/devices/0000\:04\:00.0/mlx4_port1
|
||||||
|
echo eth >/sys/bus/pci/devices/0000\:04\:00.0/mlx4_port2
|
||||||
|
'';
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue