[systemd-commits] 4 commits - Makefile.am src/71-seat.rules src/logind.c src/logind-dbus.c

Lennart Poettering lennart at kemper.freedesktop.org
Tue Jun 28 10:25:20 PDT 2011


 Makefile.am       |    4 ++--
 src/71-seat.rules |   10 +++++++---
 src/logind-dbus.c |   12 ++++++++++++
 src/logind.c      |    2 +-
 4 files changed, 22 insertions(+), 6 deletions(-)

New commits:
commit 4091baaaf421c8199430bceae0485044b74754bd
Author: Lennart Poettering <lennart at poettering.net>
Date:   Tue Jun 28 19:24:09 2011 +0200

    udev: dynamically generate seat where applicable from ID_PATH

diff --git a/src/71-seat.rules b/src/71-seat.rules
index c13bf08..636cafd 100644
--- a/src/71-seat.rules
+++ b/src/71-seat.rules
@@ -15,7 +15,10 @@ SUBSYSTEM=="usb", ATTR{bDeviceClass}=="09", TAG+="seat"
 SUBSYSTEM=="usb", ATTR{idVendor}=="2230", ATTR{idProduct}=="0001", ENV{ID_AUTOSEAT}="1"
 
 IMPORT{parent}="ID_SEAT"
-ENV{ID_AUTOSEAT}=="1", ENV{ID_SEAT}=="", ENV{ID_SEAT}="seat-foo"
-ENV{ID_SEAT}!="", TAG+="seat-foo"
+
+ENV{ID_AUTOSEAT}=="1", ENV{ID_SEAT}=="", ENV{ID_PATH}=="", IMPORT{program}="path_id %p"
+ENV{ID_AUTOSEAT}=="1", ENV{ID_SEAT}=="", ENV{ID_PATH}!="", ENV{ID_SEAT}="seat-$env{ID_PATH}"
+
+ENV{ID_SEAT}!="", TAG+="$env{ID_SEAT}"
 
 LABEL="seat_end"

commit bbd4388153bde7b7fdb39ce5c88dd92f7b8a4d2d
Author: Lennart Poettering <lennart at poettering.net>
Date:   Tue Jun 28 19:23:38 2011 +0200

    udev: only tag the main card device of a sound card with 'seat'

diff --git a/src/71-seat.rules b/src/71-seat.rules
index 3969837..c13bf08 100644
--- a/src/71-seat.rules
+++ b/src/71-seat.rules
@@ -7,7 +7,8 @@
 
 ACTION=="remove", GOTO="seat_end"
 
-TAG=="uaccess", TAG+="seat"
+TAG=="uaccess", SUBSYSTEM!="sound", TAG+="seat"
+SUBSYSTEM=="sound", KERNEL=="card*", TAG+="seat"
 SUBSYSTEM=="input", TAG+="seat"
 SUBSYSTEM=="graphics", KERNEL=="fb[0-9]*", TAG+="seat"
 SUBSYSTEM=="usb", ATTR{bDeviceClass}=="09", TAG+="seat"

commit 38f3fc7da74d5d82cd0e4282e45bac32152ea076
Author: Lennart Poettering <lennart at poettering.net>
Date:   Tue Jun 28 18:16:32 2011 +0200

    logind: when changing linger stetings, make sure they take place immediately

diff --git a/src/logind-dbus.c b/src/logind-dbus.c
index 320bb35..af5176c 100644
--- a/src/logind-dbus.c
+++ b/src/logind-dbus.c
@@ -928,17 +928,29 @@ static DBusHandlerResult manager_message_handler(
                         goto oom;
 
                 if (b) {
+                        User *u;
+
                         r = touch(path);
                         free(path);
 
                         if (r < 0)
                                 return bus_send_error_reply(connection, message, &error, r);
+
+                        if (manager_add_user_by_uid(m, uid, &u) >= 0)
+                                user_start(u);
+
                 } else {
+                        User *u;
+
                         r = unlink(path);
                         free(path);
 
                         if (r < 0 && errno != ENOENT)
                                 return bus_send_error_reply(connection, message, &error, -errno);
+
+                        u = hashmap_get(m->users, ULONG_TO_PTR((unsigned long) uid));
+                        if (u)
+                                user_add_to_gc_queue(u);
                 }
 
                 reply = dbus_message_new_method_return(message);

commit cd9e5d0a7697b3ccbc4dcb04444e6b42f5d309d1
Author: Lennart Poettering <lennart at poettering.net>
Date:   Tue Jun 28 18:16:00 2011 +0200

    logind: activate autovt at .service instead of autovt-getty at .service when the user switches to a previously unused tty, since it doesn't have to be a getty we start on it on demand

diff --git a/Makefile.am b/Makefile.am
index 4107787..d110f31 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1514,14 +1514,14 @@ endif
 		$(LN_S) graphical.target runlevel5.target && \
 		$(LN_S) reboot.target runlevel6.target )
 	( cd $(DESTDIR)$(systemunitdir) && \
-		rm -f default.target ctrl-alt-del.target dbus-org.freedesktop.hostname1.service dbus-org.freedesktop.locale1.service dbus-org.freedesktop.timedate1.service dbus-org.freedesktop.login1.service autovt-getty at .service && \
+		rm -f default.target ctrl-alt-del.target dbus-org.freedesktop.hostname1.service dbus-org.freedesktop.locale1.service dbus-org.freedesktop.timedate1.service dbus-org.freedesktop.login1.service autovt at .service && \
 		$(LN_S) graphical.target default.target && \
 		$(LN_S) reboot.target ctrl-alt-del.target && \
                 $(LN_S) systemd-hostnamed.service dbus-org.freedesktop.hostname1.service && \
                 $(LN_S) systemd-localed.service dbus-org.freedesktop.locale1.service && \
                 $(LN_S) systemd-timedated.service dbus-org.freedesktop.timedate1.service && \
                 $(LN_S) systemd-logind.service dbus-org.freedesktop.login1.service && \
-                $(LN_S) getty at .service autovt-getty at .service )
+                $(LN_S) getty at .service autovt at .service )
 	( cd $(DESTDIR)$(systemunitdir)/multi-user.target.wants && \
 		rm -f getty.target systemd-user-sessions.service systemd-ask-password-wall.path systemd-logind.service && \
 		$(LN_S) ../getty.target getty.target && \
diff --git a/src/logind.c b/src/logind.c
index 8fa7661..a0a89c0 100644
--- a/src/logind.c
+++ b/src/logind.c
@@ -729,7 +729,7 @@ int manager_spawn_autovt(Manager *m, int vtnr) {
                 goto finish;
         }
 
-        if (asprintf(&name, "autovt-getty at tty%i.service", vtnr) < 0) {
+        if (asprintf(&name, "autovt at tty%i.service", vtnr) < 0) {
                 log_error("Could not allocate service name.");
                 r = -ENOMEM;
                 goto finish;



More information about the systemd-commits mailing list