def sys_v_init_command_generator(command):
 command_name = 'service'
 if (command == 'is_enabled'):
  command_name = 'chkconfig'
  command = ''
 elif (command == 'enable'):
  command_name = 'chkconfig'
  command = 'on'
 elif (command == 'disable'):
  command_name = 'chkconfig'
  command = 'off'
 elif (command == 'list'):
  def list_command(service_name):
   return ['chkconfig', '--list']
  return list_command
 elif (command == 'set_target'):
  def set_target_command(target):
   target = convert_systemd_target_to_runlevel(target)
   return ['telinit', target]
  return set_target_command
 def method(service_name):
  return [command_name, service_name, command]
 return method

def sys_v_init_command_generator ( command ) : command_name = 'service' if ( command == 'is_enabled' ) : command_name = 'chkconfig' command = '' elif ( command == 'enable' ) : command_name = 'chkconfig' command = 'on' elif ( command == 'disable' ) : command_name = 'chkconfig' command = 'off' elif ( command == 'list' ) : def list_command ( service_name ) : return [ 'chkconfig' , '--list' ] return list_command elif ( command == 'set_target' ) : def set_target_command ( target ) : target = convert_systemd_target_to_runlevel ( target ) return [ 'telinit' , target ] return set_target_command def method ( service_name ) : return [ command_name , service_name , command ] return method
generate lists of command arguments for sys_v style inits .