Commit 5878e6c7 authored by Franco Fichtner's avatar Franco Fichtner

interfaces: merge netgraph progress from master (not enabled)

parent 3ab34306
...@@ -67,6 +67,7 @@ CORE_DEPENDS?= apinger \ ...@@ -67,6 +67,7 @@ CORE_DEPENDS?= apinger \
miniupnpd \ miniupnpd \
mpd4 \ mpd4 \
mpd5 \ mpd5 \
ngattach \
ntp \ ntp \
openssh-portable \ openssh-portable \
openvpn \ openvpn \
......
<?php <?php
/* /*
Copyright (c) 2015 Franco Fichtner <franco@opnsense.org> Copyright (c) 2015-2016 Franco Fichtner <franco@opnsense.org>
All rights reserved. All rights reserved.
Redistribution and use in source and binary forms, with or without Redistribution and use in source and binary forms, with or without
...@@ -199,3 +199,18 @@ function legacy_interface_details($intf) ...@@ -199,3 +199,18 @@ function legacy_interface_details($intf)
} }
return $result; return $result;
} }
function legacy_netgraph_attach($ifs)
{
mwexecf('/usr/local/sbin/ngattach %s', array($ifs));
}
function legacy_netgraph_detach($ifs)
{
mwexecf('/usr/sbin/ngctl msg %s: detach', array($ifs));
}
function legacy_netgraph_rename($tmpifs, $ifs)
{
mwexecf('/usr/sbin/ngctl name %s: %s', array($tmpifs, $ifs));
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment