The file '/etc/network/interfaces' will be (re-)generated by OMV on demand. Thus custom changes that are done by the user will get lost. To prevent this, the config generation now supports custom scripts to add additional configuration to the '/etc/network/interfaces' file when OMV is generating it. Using this new feature it is no problem to add bridge or VLAN configurations.
To do that a script must be located at /usr/share/openmediavault/mkconf/interfaces.d/. The script should look like the following:
#!/bin/sh
#
# This file is part of OpenMediaVault.
#
# @license http://www.gnu.org/licenses/gpl.html GPL Version 3
# @author Volker Theile <volker.theile@openmediavault.org>
# @copyright Copyright (c) 2009-2015 Volker Theile
#
# OpenMediaVault is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# any later version.
#
# OpenMediaVault is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenMediaVault. If not, see <http://www.gnu.org/licenses/>.
set -e
. /etc/default/openmediavault
. /usr/share/openmediavault/scripts/helper-functions
OMV_INTERFACES_CONFIG=${OMV_INTERFACES_CONFIG:-"/etc/network/interfaces"}
cat <<EOF >> ${OMV_INTERFACES_CONFIG}
# The loopback network interface
auto lo
iface lo inet loopback
iface lo inet6 loopback
EOF
Alles anzeigen
The feature will be available with openmediavault 1.11 (see http://sourceforge.net/p/openmediavault/code/1661).
This is obsolete starting with openmediavault 4.0.18 (see https://github.com/openmediava…d3f27749566afe2ae690033a2). Simply put your custom inetrface stanzas in a file below the /etc/network/interfaces.d directory.