daemon: Remove another warn + return err
Don't double-log here, make the error flow look like everywhere else.
@@ -597,12 +597,11 @@ func (dn *Daemon) enableUnit(unit igntypes.Unit) error {
servicePath := filepath.Join(pathSystemd, unit.Name)
err := renameio.Symlink(servicePath, wantsPath)
if err != nil {
- glog.Warningf("Cannot enable unit %s: %s", unit.Name, err)
- } else {
+ return err
+ }
glog.Infof("Enabled %s", unit.Name)
glog.V(2).Infof("Symlinked %s to %s", servicePath, wantsPath)
- }
- return err
+ return nil
}
// disableUnit disables a systemd unit via symlink removal
