def autostart_list(self):
"""Return a list of the autostart service name.
"""
with open('/etc/inittab') as f:
for line in f:
if line.startswith('id:'):
startlevel = line.split(':')[1]
break
rcpath = '/etc/rc.d/rc%s.d/' % startlevel
services = [
os.path.basename(os.readlink(filepath))
for filepath in glob.glob('%s/S*' % rcpath)]
return services
#}}}
#{{{Tool
评论列表
文章目录