celestial_tools.client.system Python Module Documentation


Commandline Parameter Manipulation

Functions related to the cmdline file

celestial_tools.client.system.cmdline.get_parameter(parameter_name: str, cmdline_file: str) → str

Retrieve a parameter from the provided cmdline file

  • parameter_name – The “key” to get from the cmdline file
  • cmdline_file – The kernel’s cmdline file

{key: value}

celestial_tools.client.system.cmdline.get_parameters(cmdline_file: str) → dict

Retrieve all of the parameters of the cmdline file

Parameters:cmdline_file – The cmdline file to load
Returns:a list of {key: , value: }
celestial_tools.client.system.cmdline.load(cmdline_file) → str

Load the given cmdline file as a string

Parameters:cmdline_file – The cmdline file to load
Returns:A string containing the content of the cmdline file
celestial_tools.client.system.cmdline.set_parameter(parameter_name, parameter_value, cmdline_file)

Set a parameter in the provided cmdline file. Create it if it doesn’t exist, overwrite it if it does exist

  • parameter_name – The “key” in the key value pair
  • parameter_value – The value to set the key to
  • cmdline_file – location of the boot partition’s cmdline file
celestial_tools.client.system.cmdline.write(parameters: dict, cmdline_file: str)

Create a cmdline file with the provided parameters Overwrite it if it exists

  • parameters – A dictionary of key/value pairs
  • cmdline_file – The boot partition’s cmdline file