mdev: be more permissive on errors (dont die): mdev -s users want that
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
90db359972
commit
5478aaf5b8
@ -303,8 +303,12 @@ static void make_device(char *path, int delete)
|
|||||||
const char *s = "$@*";
|
const char *s = "$@*";
|
||||||
const char *s2 = strchr(s, val[0]);
|
const char *s2 = strchr(s, val[0]);
|
||||||
|
|
||||||
if (!s2)
|
if (!s2) {
|
||||||
bb_error_msg_and_die("bad line %u", parser->lineno);
|
bb_error_msg("bad line %u", parser->lineno);
|
||||||
|
if (ENABLE_FEATURE_MDEV_RENAME)
|
||||||
|
free(alias);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
/* Are we running this command now?
|
/* Are we running this command now?
|
||||||
* Run $cmd on delete, @cmd on create, *cmd on both
|
* Run $cmd on delete, @cmd on create, *cmd on both
|
||||||
@ -346,7 +350,7 @@ static void make_device(char *path, int delete)
|
|||||||
putenv(s);
|
putenv(s);
|
||||||
putenv(s1);
|
putenv(s1);
|
||||||
if (system(command) == -1)
|
if (system(command) == -1)
|
||||||
bb_perror_msg_and_die("can't run '%s'", command);
|
bb_perror_msg("can't run '%s'", command);
|
||||||
unsetenv("SUBSYSTEM");
|
unsetenv("SUBSYSTEM");
|
||||||
free(s1);
|
free(s1);
|
||||||
unsetenv("MDEV");
|
unsetenv("MDEV");
|
||||||
|
Loading…
Reference in New Issue
Block a user