Mageia Bugzilla – Attachment 1837 Details for
Bug 4500
3G Modem not switched to modem mode (probably due to not mounting of /proc/bus/usb)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
[patch]
Systemd patch to mount /proc/bus/usb
0509-mageia-Add-mount-automount-units-for-proc-bus-usb.patch (text/plain), 4.61 KB, created by
Colin Guthrie
on 2012-03-25 01:37:04 CET
(
hide
)
Description:
Systemd patch to mount /proc/bus/usb
Filename:
MIME Type:
Creator:
Colin Guthrie
Created:
2012-03-25 01:37:04 CET
Size:
4.61 KB
patch
obsolete
>From 20ed0eddb977ddd12fe2f5612fabdafb099ce215 Mon Sep 17 00:00:00 2001 >From: Colin Guthrie <colin@mageia.org> >Date: Sat, 24 Mar 2012 23:13:25 +0000 >Subject: [PATCH] mageia: Add mount+automount units for /proc/bus/usb > >https://bugs.mageia.org/show_bug.cgi?id=4500 >--- > Makefile.am | 15 +++++++++++++++ > src/mount-setup.c | 5 ++--- > units/mageia/proc-bus-usb-setup.service | 19 +++++++++++++++++++ > units/mageia/proc-bus-usb.automount | 15 +++++++++++++++ > units/mageia/proc-bus-usb.mount | 16 ++++++++++++++++ > 5 files changed, 67 insertions(+), 3 deletions(-) > create mode 100644 units/mageia/proc-bus-usb-setup.service > create mode 100644 units/mageia/proc-bus-usb.automount > create mode 100644 units/mageia/proc-bus-usb.mount > >diff --git a/Makefile.am b/Makefile.am >index 0672ca3..703bd4c 100644 >--- a/Makefile.am >+++ b/Makefile.am >@@ -406,10 +406,25 @@ if TARGET_MAGEIA > dist_systemunit_DATA += \ > units/mageia/prefdm.service \ > units/mageia/display-manager-failure.service \ >+ units/mageia/proc-bus-usb-setup.service \ >+ units/mageia/proc-bus-usb.mount \ >+ units/mageia/proc-bus-usb.automount \ > units/fedora/rc-local.service \ > units/fedora/halt-local.service > systemgenerator_PROGRAMS += \ > systemd-rc-local-generator >+ >+proc-bus-usb-install-data-hook: >+ $(MKDIR_P) -m 0755 \ >+ $(DESTDIR)$(systemunitdir)/sysinit.target.wants >+ ( cd $(DESTDIR)$(systemunitdir)/sysinit.target.wants && \ >+ rm -f proc-bus-usb-setup.service \ >+ proc-bus-usb.automount && \ >+ $(LN_S) ../proc-bus-usb-setup.service proc-bus-usb-setup.service && \ >+ $(LN_S) ../proc-bus-usb.automount proc-bus-usb.automount ) >+ >+INSTALL_DATA_HOOKS += \ >+ proc-bus-usb-install-data-hook > endif > > if HAVE_PLYMOUTH >diff --git a/src/mount-setup.c b/src/mount-setup.c >index 7c14ea8..94f7a0a 100644 >--- a/src/mount-setup.c >+++ b/src/mount-setup.c >@@ -70,8 +70,7 @@ static const MountPoint mount_table[] = { > > static const char * const ignore_paths[] = { > "/sys/fs/selinux", >- "/selinux", >- "/proc/bus/usb" >+ "/selinux" > }; > > bool mount_point_is_api(const char *path) { >@@ -80,7 +79,7 @@ bool mount_point_is_api(const char *path) { > /* Checks if this mount point is considered "API", and hence > * should be ignored */ > >- for (i = 0; i < ELEMENTSOF(mount_table); i ++) >+ for (i = 0; i < ELEMENTSOF(mount_table); i++) > if (path_equal(path, mount_table[i].where)) > return true; > >diff --git a/units/mageia/proc-bus-usb-setup.service b/units/mageia/proc-bus-usb-setup.service >new file mode 100644 >index 0000000..edaeb20 >--- /dev/null >+++ b/units/mageia/proc-bus-usb-setup.service >@@ -0,0 +1,19 @@ >+# This file is part of systemd. >+# >+# systemd is free software; you can redistribute it and/or modify it >+# under the terms of the GNU General Public License as published by >+# the Free Software Foundation; either version 2 of the License, or >+# (at your option) any later version. >+ >+[Unit] >+Description=Legacy USB proc File System Setup >+DefaultDependencies=no >+Conflicts=shutdown.target >+After=systemd-readahead-collect.service systemd-readahead-replay.service >+Before=sysinit.target shutdown.target proc-bus-usb.automount >+ConditionPathExists=!/proc/bus/usb >+ >+[Service] >+Type=oneshot >+RemainAfterExit=yes >+ExecStart=-/sbin/modprobe usbcore >diff --git a/units/mageia/proc-bus-usb.automount b/units/mageia/proc-bus-usb.automount >new file mode 100644 >index 0000000..72c9111 >--- /dev/null >+++ b/units/mageia/proc-bus-usb.automount >@@ -0,0 +1,15 @@ >+# This file is part of systemd. >+# >+# systemd is free software; you can redistribute it and/or modify it >+# under the terms of the GNU General Public License as published by >+# the Free Software Foundation; either version 2 of the License, or >+# (at your option) any later version. >+ >+[Unit] >+Description=Legacy USB proc File System Automount Point >+DefaultDependencies=no >+Before=sysinit.target >+ConditionPathExists=/proc/bus/usb >+ >+[Automount] >+Where=/proc/bus/usb >diff --git a/units/mageia/proc-bus-usb.mount b/units/mageia/proc-bus-usb.mount >new file mode 100644 >index 0000000..084b306 >--- /dev/null >+++ b/units/mageia/proc-bus-usb.mount >@@ -0,0 +1,16 @@ >+# This file is part of systemd. >+# >+# systemd is free software; you can redistribute it and/or modify it >+# under the terms of the GNU General Public License as published by >+# the Free Software Foundation; either version 2 of the License, or >+# (at your option) any later version. >+ >+[Unit] >+Description=Legacy USB proc File System >+DefaultDependencies=no >+ >+[Mount] >+What=usbfs >+Where=/proc/bus/usb >+Type=usbfs >+Options=devmode=0664,devgid=43 >-- >1.7.9.3 >
From 20ed0eddb977ddd12fe2f5612fabdafb099ce215 Mon Sep 17 00:00:00 2001 From: Colin Guthrie <colin@mageia.org> Date: Sat, 24 Mar 2012 23:13:25 +0000 Subject: [PATCH] mageia: Add mount+automount units for /proc/bus/usb https://bugs.mageia.org/show_bug.cgi?id=4500 --- Makefile.am | 15 +++++++++++++++ src/mount-setup.c | 5 ++--- units/mageia/proc-bus-usb-setup.service | 19 +++++++++++++++++++ units/mageia/proc-bus-usb.automount | 15 +++++++++++++++ units/mageia/proc-bus-usb.mount | 16 ++++++++++++++++ 5 files changed, 67 insertions(+), 3 deletions(-) create mode 100644 units/mageia/proc-bus-usb-setup.service create mode 100644 units/mageia/proc-bus-usb.automount create mode 100644 units/mageia/proc-bus-usb.mount diff --git a/Makefile.am b/Makefile.am index 0672ca3..703bd4c 100644 --- a/Makefile.am +++ b/Makefile.am @@ -406,10 +406,25 @@ if TARGET_MAGEIA dist_systemunit_DATA += \ units/mageia/prefdm.service \ units/mageia/display-manager-failure.service \ + units/mageia/proc-bus-usb-setup.service \ + units/mageia/proc-bus-usb.mount \ + units/mageia/proc-bus-usb.automount \ units/fedora/rc-local.service \ units/fedora/halt-local.service systemgenerator_PROGRAMS += \ systemd-rc-local-generator + +proc-bus-usb-install-data-hook: + $(MKDIR_P) -m 0755 \ + $(DESTDIR)$(systemunitdir)/sysinit.target.wants + ( cd $(DESTDIR)$(systemunitdir)/sysinit.target.wants && \ + rm -f proc-bus-usb-setup.service \ + proc-bus-usb.automount && \ + $(LN_S) ../proc-bus-usb-setup.service proc-bus-usb-setup.service && \ + $(LN_S) ../proc-bus-usb.automount proc-bus-usb.automount ) + +INSTALL_DATA_HOOKS += \ + proc-bus-usb-install-data-hook endif if HAVE_PLYMOUTH diff --git a/src/mount-setup.c b/src/mount-setup.c index 7c14ea8..94f7a0a 100644 --- a/src/mount-setup.c +++ b/src/mount-setup.c @@ -70,8 +70,7 @@ static const MountPoint mount_table[] = { static const char * const ignore_paths[] = { "/sys/fs/selinux", - "/selinux", - "/proc/bus/usb" + "/selinux" }; bool mount_point_is_api(const char *path) { @@ -80,7 +79,7 @@ bool mount_point_is_api(const char *path) { /* Checks if this mount point is considered "API", and hence * should be ignored */ - for (i = 0; i < ELEMENTSOF(mount_table); i ++) + for (i = 0; i < ELEMENTSOF(mount_table); i++) if (path_equal(path, mount_table[i].where)) return true; diff --git a/units/mageia/proc-bus-usb-setup.service b/units/mageia/proc-bus-usb-setup.service new file mode 100644 index 0000000..edaeb20 --- /dev/null +++ b/units/mageia/proc-bus-usb-setup.service @@ -0,0 +1,19 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. + +[Unit] +Description=Legacy USB proc File System Setup +DefaultDependencies=no +Conflicts=shutdown.target +After=systemd-readahead-collect.service systemd-readahead-replay.service +Before=sysinit.target shutdown.target proc-bus-usb.automount +ConditionPathExists=!/proc/bus/usb + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStart=-/sbin/modprobe usbcore diff --git a/units/mageia/proc-bus-usb.automount b/units/mageia/proc-bus-usb.automount new file mode 100644 index 0000000..72c9111 --- /dev/null +++ b/units/mageia/proc-bus-usb.automount @@ -0,0 +1,15 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. + +[Unit] +Description=Legacy USB proc File System Automount Point +DefaultDependencies=no +Before=sysinit.target +ConditionPathExists=/proc/bus/usb + +[Automount] +Where=/proc/bus/usb diff --git a/units/mageia/proc-bus-usb.mount b/units/mageia/proc-bus-usb.mount new file mode 100644 index 0000000..084b306 --- /dev/null +++ b/units/mageia/proc-bus-usb.mount @@ -0,0 +1,16 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. + +[Unit] +Description=Legacy USB proc File System +DefaultDependencies=no + +[Mount] +What=usbfs +Where=/proc/bus/usb +Type=usbfs +Options=devmode=0664,devgid=43 -- 1.7.9.3
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 4500
: 1837