From: Tom Gundersen Date: Mon, 27 Oct 2014 16:55:03 +0000 (+0100) Subject: static-nodes: indicate that creation of static nodes should only happen at boot X-Git-Tag: v19~5 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=27eceb2e4ecbf2e31940b67cee682a6935f61e6c;p=thirdparty%2Fkmod.git static-nodes: indicate that creation of static nodes should only happen at boot udev will only manage static nodes that exist at the time udev is started, so creating static nodes later on will likely not behave as expected. In particular, recreating the static nodes at run-time will reset any permissions udev may have applied to the nodes at boot. See and the discussion following . Note that this requires (the yet to be released) systemd v217 or a backport of systemd patch 8c94052ee543c3598a3c7b0c46688150aa2c6168. --- diff --git a/tools/static-nodes.c b/tools/static-nodes.c index d1e3b6e6..8d2356da 100644 --- a/tools/static-nodes.c +++ b/tools/static-nodes.c @@ -96,7 +96,7 @@ static int write_tmpfiles(FILE *out, char modname[], char devname[], char type, return EXIT_FAILURE; } - ret = fprintf(out, "%c /dev/%s 0600 - - - %u:%u\n", + ret = fprintf(out, "%c! /dev/%s 0600 - - - %u:%u\n", type, devname, maj, min); if (ret < 0) return EXIT_FAILURE;