forked from maxplanck-ie/Genes2Functions
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmounts.py
executable file
·26 lines (24 loc) · 882 Bytes
/
mounts.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/usr/bin/env python
import os
import os.path
import subprocess
import shutil
import glob
# Handle automounter updates
if os.path.exists("/export/automount"):
try:
os.mkdir("/etc/automount")
except:
pass
for f in glob.glob("/export/automount/*"):
if os.path.basename(f) in ["auto.master", "yp.conf", "nsswitch.conf"]:
shutil.copy(f, "/etc/{}".format(os.path.basename(f)))
else:
shutil.copy(f, "/etc/automount/{}".format(os.path.basename(f)))
subprocess.check_call(["/usr/sbin/rsyslogd"])
#subprocess.check_call(["domainname", "solsys1.immunbio.mpg.de"])
subprocess.check_call(["/sbin/rpcbind"])
subprocess.check_call(["/sbin/rpc.statd", "--no-notify"])
subprocess.check_call(["/usr/sbin/ypbind"])
subprocess.check_call(["/usr/sbin/automount"])
subprocess.check_call(["sleep", "15"])