Use file.append to write

This commit is contained in:
Mike Place 2014-11-17 13:45:27 -07:00
parent 3286bc0833
commit 246434ec86

View File

@ -1486,7 +1486,7 @@ def build_bond(iface, **settings):
__salt__['cmd.run']( __salt__['cmd.run'](
'sed -i -e "/^options\\s{0}.*/d" /etc/modprobe.conf'.format(iface) 'sed -i -e "/^options\\s{0}.*/d" /etc/modprobe.conf'.format(iface)
) )
__salt__['cmd.run']('cat {0} >> /etc/modprobe.conf'.format(path)) __salt__['file.append']('/etc/modprobe.conf', path)
# Load kernel module # Load kernel module
__salt__['kmod.load']('bonding') __salt__['kmod.load']('bonding')