7a00473 Fork to execute systemctl calls

Authored and Committed by sgallagh 8 years ago
    Fork to execute systemctl calls
    
    Calling os.execute() to apply presets was a mistake for two reasons:
    1) os.execute() calls out to a shell, which defeated the purpose of
       rewriting the scriptlet in Lua to avoid a /bin/sh dependency.
    2) os.execute() only took a single argument, so it wasn't actually
       applying the presets at all.
    
    Rewriting this to explicitly fork()/exec() results in properly-
    applied presets without the /bin/sh dependency.
    
    Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
    
        
file modified
+11 -2