From 7ffbf7127603a935236785f6a59a104583194df4 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Fri, 2 Nov 2018 12:07:09 +0100 Subject: all: add "${MAC}" substituion for "connection.stable-id" We already had "${DEVICE}" which uses the interface name. In times of predictable interface naming, that works well. It allows the user to generate IDs per device which don't change when the hardware is replaced. "${MAC}" is similar, except that is uses the permanent MAC address of the device. The substitution results in the empty word, if the device has no permanent MAC address (like software devices). The per-device substitutions "${DEVICE}" and "${MAC}" are especially interesting with "connection.multi-connect=multiple". --- libnm-core/nm-setting-connection.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libnm-core') diff --git a/libnm-core/nm-setting-connection.c b/libnm-core/nm-setting-connection.c index 1731afa66e..3c3a4dcee5 100644 --- a/libnm-core/nm-setting-connection.c +++ b/libnm-core/nm-setting-connection.c @@ -1626,11 +1626,11 @@ nm_setting_connection_class_init (NMSettingConnectionClass *klass) * name is included, so that different interfaces yield different addresses. * * The '$' character is treated special to perform dynamic substitutions - * at runtime. Currently supported are "${CONNECTION}", "${DEVICE}", + * at runtime. Currently supported are "${CONNECTION}", "${DEVICE}", "${MAC}", * "${BOOT}", "${RANDOM}". * These effectively create unique IDs per-connection, per-device, per-boot, * or every time. Note that "${DEVICE}" corresponds the the interface name of the - * device. + * device and "${MAC}" is the permanent MAC address of the device. * Any unrecognized patterns following '$' are treated verbatim, however * are reserved for future use. You are thus advised to avoid '$' or * escape it as "$$". -- cgit v1.2.1