lutostag@cia:~$ sudo mkdir /etc/beegfs
lutostag@cia:~$ sudo echo 'sysMgmtdHost thing' > /etc/beegfs/beegfs-client.conf
lutostag@cia:~$ sudo chmod -R 777 /etc/beegfs
lutostag@cia:~$ python
Python 2.7.12+ (default, Sep 17 2016, 12:08:02)
[GCC 6.2.0 20160914] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import subprocess
>>> subprocess.check_call(['sh', '-c', 'sed -i "s/^sysMgmtdHost.*$/sysMgmtdHost = 10.99.11.124/" /etc/beegfs/beegfs-client.conf'])
0
>>>
lutostag@cia:~$ cat /etc/beegfs/beegfs-client.conf
sysMgmtdHost = 10.99.11.124