diff --git a/src/rc-update.c b/src/rc-update.c index e39db593..7c611d3c 100644 --- a/src/rc-update.c +++ b/src/rc-update.c @@ -241,15 +241,14 @@ int rc_update (int argc, char **argv) if (action & DOADD) { actfunc = add; - if (! runlevels) - rc_strlist_add (&runlevels, rc_runlevel_get ()); } else if (action & DODELETE) { actfunc = delete; - if (! runlevels) - runlevels = rc_runlevel_list (); } else eerrorx ("%s: invalid action", applet); + if (! runlevels) + rc_strlist_add (&runlevels, rc_runlevel_get ()); + if (! runlevels) eerrorx ("%s: no runlevels found", applet);