RcLocal - file /etc/rc.d/rc.local

class insights.parsers.rc_local.RcLocal(context)[source]

Bases: Parser

Parse the /etc/rc.d/rc.local file.

Sample input:

#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.

touch /var/lock/subsys/local
echo never > /sys/kernel/mm/redhat_transparent_hugepage/enabled
data

List of all lines from rc.local that are not comments or blank

Type

list

Examples

>>> shared[RcLocal].data[0]
'touch /var/lock/subsys/local'
>>> shared[RcLocal].get('kernel')
['echo never > /sys/kernel/mm/redhat_transparent_hugepage/enabled']
get(value)[source]

Returns the lines containing string value.

parse_content(content)[source]

This method must be implemented by classes based on this class.