Re: how reload udev rules and systemd on F18

2013-02-15 Thread Sérgio Basto
On Qui, 2013-02-14 at 09:37 +0100, Florian Weimer wrote: 
 On 02/13/2013 07:40 PM, Kay Sievers wrote:
  On Wed, Feb 13, 2013 at 6:29 PM, Sérgio Basto ser...@serjux.com wrote:
  what you mean by redundant ? if I not reboot system, do I need
  --reload-rules on F16+ ? (when install the package )
  and when the package is remove, how I clean it up ? (without reboot)
 
  Udev finds that out on its own, has done that in the past and still does 
  that.
 
 If this doesn't happen on his system, perhaps Sérgio could put a VM 
 image that demonstrates this somewhere, so others can reproduce this 
 issue and fix it?
 
 Either it's a missing feature or genuine bug.  There's a real use case 
 here, after all (avoid an unnecessary reboot).


Checking man udevadm, --sysname-match=
Best match seems be what is it: --subsystem-match=usb 
So just trigger all usb(s) :-D  
I don't know if it a bug or not, in future maybe, I'll try do a debug
environment .

Thanks,
-- 
Sérgio M. B.

-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel

Re: how reload udev rules and systemd on F18

2013-02-14 Thread Florian Weimer

On 02/13/2013 07:40 PM, Kay Sievers wrote:

On Wed, Feb 13, 2013 at 6:29 PM, Sérgio Basto ser...@serjux.com wrote:

what you mean by redundant ? if I not reboot system, do I need
--reload-rules on F16+ ? (when install the package )
and when the package is remove, how I clean it up ? (without reboot)


Udev finds that out on its own, has done that in the past and still does that.


If this doesn't happen on his system, perhaps Sérgio could put a VM 
image that demonstrates this somewhere, so others can reproduce this 
issue and fix it?


Either it's a missing feature or genuine bug.  There's a real use case 
here, after all (avoid an unnecessary reboot).


--
Florian Weimer / Red Hat Product Security Team
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel

Re: how reload udev rules and systemd on F18

2013-02-14 Thread poma
On 02/05/13 07:42, Sérgio Basto wrote:
 On Ter, 2013-01-29 at 17:59 +, Sérgio Basto wrote: 
 On Ter, 2013-01-29 at 01:52 +0100, Lennart Poettering wrote:
 Yes, even then. udev will notice rules dropped there.

 OK I will test that 
 
 I just test it and doesn't assign USB devices.
 
 But seeing what udev.service , udev-trigger.service and
 udev-settle.service do on :
 systemctl restart udev.service
 systemctl restart udev-trigger.service
 systemctl restart udev-settle.service
 

Fedora 18 has a *systemd-* prefix for such an obscure services ;)

[…]


Cheers,
poma


-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel

Re: how reload udev rules and systemd on F18

2013-02-14 Thread Sérgio Basto
On Qui, 2013-02-14 at 09:37 +0100, Florian Weimer wrote: 
 On 02/13/2013 07:40 PM, Kay Sievers wrote:
  On Wed, Feb 13, 2013 at 6:29 PM, Sérgio Basto ser...@serjux.com wrote:
  what you mean by redundant ? if I not reboot system, do I need
  --reload-rules on F16+ ? (when install the package )
  and when the package is remove, how I clean it up ? (without reboot)
 
  Udev finds that out on its own, has done that in the past and still does 
  that.
 
 If this doesn't happen on his system, perhaps Sérgio could put a VM 
 image that demonstrates this somewhere, so others can reproduce this 
 issue and fix it?
 
 Either it's a missing feature or genuine bug.  There's a real use case 
 here, after all (avoid an unnecessary reboot).

System doesn't assign USB devices, /dev/vboxusb/* , tested on F18,  without do: 

/sbin/udevadm trigger --subsystem-match=usb --action=add

that is a bug ? 

I'm here : Special device nodes which are not interesting for anything
else, and it is absolutely guaranteed that there is no current user at
this moment, can be triggered that way, check: --sysname-match= in the
udev man page


-- 
Sérgio M. B.

-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel

Re: how reload udev rules and systemd on F18

2013-02-13 Thread Sérgio Basto
On Qua, 2013-02-13 at 04:00 +0100, Lennart Poettering wrote: 
 On Sat, 09.02.13 13:18, Sérgio Basto (ser...@serjux.com) wrote:
 
  On Sex, 2013-02-08 at 10:08 +0100, Florian Weimer wrote: 
   On 02/05/2013 07:43 PM, Sérgio Basto wrote:
   
Any advises or opinions ?
   
   I think you haven't yet described the original problem you're trying to 
   solve.
  
  Hi, 
  
  When we install VirtualBox from rpmfusion , I'd like create /dev/vboxusb
  proxies to host system without reboot box. I want that ends with:
 
 Well, be that as it may. It's not OK to retrigger all devices. That's an
 admin feature, and a feature for very specific usecases, but it's
 nothing you are allowed to just call in package post scripts...
 
 Basically, you cannot do this. You must either tell the admin to invoke
 udevadm trigger on his own, or just not do it.

Hi, OK but we don't have any command to trigger only /dev/vboxusb/* ? 


  
  ll /dev/vboxusb -d 
  drwxr-x--- 4 root vboxusers 80 Fev  5 18:42 /dev/vboxusb
  
  ll /dev/vboxusb
  total 0
  drwxr-x--- 2 root vboxusers 80 Fev  9 11:19 002
  drwxr-x--- 2 root vboxusers 60 Fev  5 18:42 001
  
  the actual scriptlet:
  # Assign USB devices
  if /sbin/udevadm control --reload-rules /dev/null 21
 
 Redundant.

what you mean by redundant ? if I not reboot system, do I need
--reload-rules on F16+ ? (when install the package ) 
and when the package is remove, how I clean it up ? (without reboot)   

  then
 /sbin/udevadm trigger --subsystem-match=usb --action=add /dev/null
 
 Not OK.

I know, but if we don't have other solution I will keep it.

  21 || :
 /sbin/udevadm settle /dev/null 21 || :
 
 Pointless, unless you are LVM, which you are not.

OK , I will remove it 

Many thanks, 
-- 
Sérgio M. B.

-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel

Re: how reload udev rules and systemd on F18

2013-02-13 Thread Kay Sievers
On Wed, Feb 13, 2013 at 6:29 PM, Sérgio Basto ser...@serjux.com wrote:

 Hi, OK but we don't have any command to trigger only /dev/vboxusb/* ?

You are not supposed to trigger changes for hardware on the running
system, *ever*. Package scripts are package scripts, not magic system
administration tools.

Special device nodes which are not interesting for anything else, and
it is absolutely guaranteed that there is no current user at this
moment, can be triggered that way, check: --sysname-match= in the udev
man page. Everything else is not ok to touch.

  the actual scriptlet:
  # Assign USB devices
  if /sbin/udevadm control --reload-rules /dev/null 21

 Redundant.

 what you mean by redundant ? if I not reboot system, do I need
 --reload-rules on F16+ ? (when install the package )
 and when the package is remove, how I clean it up ? (without reboot)

Udev finds that out on its own, has done that in the past and still does that.

  then
 /sbin/udevadm trigger --subsystem-match=usb --action=add /dev/null

 Not OK.

 I know, but if we don't have other solution I will keep it.

Please remove it. You are doing *packaging* not system
*administration*. All currently running hardware is taboo for package
scripts to even look at it.

Kay
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel

Re: how reload udev rules and systemd on F18

2013-02-12 Thread Lennart Poettering
On Sat, 09.02.13 13:18, Sérgio Basto (ser...@serjux.com) wrote:

 On Sex, 2013-02-08 at 10:08 +0100, Florian Weimer wrote: 
  On 02/05/2013 07:43 PM, Sérgio Basto wrote:
  
   Any advises or opinions ?
  
  I think you haven't yet described the original problem you're trying to 
  solve.
 
 Hi, 
 
 When we install VirtualBox from rpmfusion , I'd like create /dev/vboxusb
 proxies to host system without reboot box. I want that ends with:

Well, be that as it may. It's not OK to retrigger all devices. That's an
admin feature, and a feature for very specific usecases, but it's
nothing you are allowed to just call in package post scripts...

Basically, you cannot do this. You must either tell the admin to invoke
udevadm trigger on his own, or just not do it.

 
 ll /dev/vboxusb -d 
 drwxr-x--- 4 root vboxusers 80 Fev  5 18:42 /dev/vboxusb
 
 ll /dev/vboxusb
 total 0
 drwxr-x--- 2 root vboxusers 80 Fev  9 11:19 002
 drwxr-x--- 2 root vboxusers 60 Fev  5 18:42 001
 
 the actual scriptlet:
 # Assign USB devices
 if /sbin/udevadm control --reload-rules /dev/null 21

Redundant.

 then
/sbin/udevadm trigger --subsystem-match=usb --action=add /dev/null

Not OK.

 21 || :
/sbin/udevadm settle /dev/null 21 || :

Pointless, unless you are LVM, which you are not.

Lennart

-- 
Lennart Poettering - Red Hat, Inc.
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel

Re: how reload udev rules and systemd on F18

2013-02-09 Thread Sérgio Basto
On Sex, 2013-02-08 at 10:08 +0100, Florian Weimer wrote: 
 On 02/05/2013 07:43 PM, Sérgio Basto wrote:
 
  Any advises or opinions ?
 
 I think you haven't yet described the original problem you're trying to 
 solve.

Hi, 

When we install VirtualBox from rpmfusion , I'd like create /dev/vboxusb
proxies to host system without reboot box. I want that ends with:

ll /dev/vboxusb -d 
drwxr-x--- 4 root vboxusers 80 Fev  5 18:42 /dev/vboxusb

ll /dev/vboxusb
total 0
drwxr-x--- 2 root vboxusers 80 Fev  9 11:19 002
drwxr-x--- 2 root vboxusers 60 Fev  5 18:42 001

the actual scriptlet:
# Assign USB devices
if /sbin/udevadm control --reload-rules /dev/null 21
then
   /sbin/udevadm trigger --subsystem-match=usb --action=add /dev/null
21 || :
   /sbin/udevadm settle /dev/null 21 || :
fi

I already send to list /etc/udev/rules.d/90-vboxdrv.rules on this
thread 
This on host master system .
And also need add 60-vboxguest.rules on guest systems 

ACTION==add, KERNEL==vboxguest, SUBSYSTEM==misc, OWNER=root,
MODE=0600
ACTION==add, KERNEL==vboxuser, SUBSYSTEM==misc, OWNER=root,
MODE=0666 

I know udevadm trigger probe all usb but without that don't know assign
USB devices, VirtualBox is not to be install on a critical system and it
is more convenient, not need reboot box and have VirtualBox system
ready .  
If you write here the scriptlet for optimal assign of USB proxies on
VirtualBox I was very grateful. 

Sorry for my weak English ...
Thanks, 
-- 
Sérgio M. B.

-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel

Re: how reload udev rules and systemd on F18

2013-02-08 Thread Florian Weimer

On 02/05/2013 07:43 PM, Sérgio Basto wrote:


Any advises or opinions ?


I think you haven't yet described the original problem you're trying to 
solve.


--
Florian Weimer / Red Hat Product Security Team
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel

Re: how reload udev rules and systemd on F18

2013-02-07 Thread Lennart Poettering
On Tue, 05.02.13 06:42, Sérgio Basto (ser...@serjux.com) wrote:

 On Ter, 2013-01-29 at 17:59 +, Sérgio Basto wrote: 
  On Ter, 2013-01-29 at 01:52 +0100, Lennart Poettering wrote:
   Yes, even then. udev will notice rules dropped there.
  
  OK I will test that 
 
 I just test it and doesn't assign USB devices.

Yes, and you shouldn't trigger those devices.

It's NOT OK to randomly trigger USB devices, that's a total NO-NO. You
can suggest the user to reboot or so, or replug the device, but just
retriggering the whole USB subsystem is explicitly not OK, and if Kay
finds you doing this in packager installer codepaths you might catch
yourself a bloody nose. ;-)

 But seeing what udev.service , udev-trigger.service and
 udev-settle.service do on :
 systemctl restart udev.service

Nope. Stay away from that. That's even worse.

 systemctl restart udev-trigger.service

Stay away from this too, see above.

 systemctl restart udev-settle.service

And definitely stay away from this as well. udev-settle is a legacy
service for broken code such as LVM, and nothing else really needs that anymore.

 I back to old scripts 
 # Assign USB devices
 if /sbin/udevadm control --reload-rules /dev/null 21

This bit is entirely unnecessary. udev does this implicitly.

 then
/sbin/udevadm trigger --subsystem-match=usb /dev/null 21 || :

Nope, forbidden. Don't do this.

/sbin/udevadm settle /dev/null 21 || :

Totally pointless... You are not LVM during boot, so stay away from this.

Lennart

-- 
Lennart Poettering - Red Hat, Inc.
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel

Re: how reload udev rules and systemd on F18

2013-02-06 Thread Ben Boeckel
On Tue, 05 Feb, 2013 at 18:43:40 GMT, Sérgio Basto wrote:
 After some tests I'm going pack with :

 if /sbin/udevadm control --reload-rules /dev/null 21
 then
/sbin/udevadm trigger --subsystem-match=usb --action=add /dev/null 21 
 || :
/sbin/udevadm settle /dev/null 21 || :
 fi

 Any advises or opinions ? 

/usr/sbin?

--Ben

-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel

Re: how reload udev rules and systemd on F18

2013-02-05 Thread drago01
On Tue, Jan 29, 2013 at 1:42 AM, Reindl Harald h.rei...@thelounge.net wrote:


 Am 29.01.2013 00:50, schrieb Kay Sievers:
 It is completely wrong to ever do that and to restart udev or other
 essential sevices from packages. No package besides udev itself is
 allowed to do restart these services

 and not only in the context of udev

 it is GENERALLY wrong
 it is wrong to restart httpd
 it is wrong to restart mysqld

 it is GENERALLY wrong to cripple this in any fedora package
 instead AT LEAST have this controlled by a global setting

 what do packagers imagine to happen by restart mysqld on machines
 where a lot of services depend on mysqld.service and randomly
 failing while the admin is EXACTLY knowing what he is doing
 and which services in which order he has to restart to get
 a new mysqld, httpd whatever version actibe?


File a bug (or better patch) to port the services you care about to
use socket activation. That way a restart wont have any consequences
like those.
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel

Re: how reload udev rules and systemd on F18

2013-02-05 Thread Sérgio Basto
On Ter, 2013-02-05 at 06:42 +, Sérgio Basto wrote:
 On Ter, 2013-01-29 at 17:59 +, Sérgio Basto wrote: 
  On Ter, 2013-01-29 at 01:52 +0100, Lennart Poettering wrote:
   Yes, even then. udev will notice rules dropped there.
  
  OK I will test that 
 
 I just test it and doesn't assign USB devices.
 
 But seeing what udev.service , udev-trigger.service and
 udev-settle.service do on :
 systemctl restart udev.service
 systemctl restart udev-trigger.service
 systemctl restart udev-settle.service
 
 
 I back to old scripts 
 # Assign USB devices
 if /sbin/udevadm control --reload-rules /dev/null 21
 then
/sbin/udevadm trigger --subsystem-match=usb /dev/null 21 || :
/sbin/udevadm settle /dev/null 21 || :
 fi


After some tests I'm going pack with :

if /sbin/udevadm control --reload-rules /dev/null 21
then
   /sbin/udevadm trigger --subsystem-match=usb --action=add /dev/null 21 || :
   /sbin/udevadm settle /dev/null 21 || :
fi

Any advises or opinions ? 

Many thanks, 
-- 
Sérgio M. B.


-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel

Re: how reload udev rules and systemd on F18

2013-02-04 Thread Sérgio Basto
On Ter, 2013-01-29 at 17:59 +, Sérgio Basto wrote: 
 On Ter, 2013-01-29 at 01:52 +0100, Lennart Poettering wrote:
  Yes, even then. udev will notice rules dropped there.
 
 OK I will test that 

I just test it and doesn't assign USB devices.

But seeing what udev.service , udev-trigger.service and
udev-settle.service do on :
systemctl restart udev.service
systemctl restart udev-trigger.service
systemctl restart udev-settle.service


I back to old scripts 
# Assign USB devices
if /sbin/udevadm control --reload-rules /dev/null 21
then
   /sbin/udevadm trigger --subsystem-match=usb /dev/null 21 || :
   /sbin/udevadm settle /dev/null 21 || :
fi

Best regards,
-- 
Sérgio M. B.

-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel

Re: how reload udev rules and systemd on F18

2013-01-30 Thread Sérgio Basto
On Ter, 2013-01-29 at 17:59 +, Sérgio Basto wrote: 
 On Ter, 2013-01-29 at 01:52 +0100, Lennart Poettering wrote:
  Yes, even then. udev will notice rules dropped there.
 
 OK I will test that 

Sorry other question , if this is True since when is True ? is
applicable on F16 ? 

Many thanks, 
-- 
Sérgio M. B.

-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel

Re: how reload udev rules and systemd on F18

2013-01-29 Thread Reindl Harald


Am 29.01.2013 00:50, schrieb Kay Sievers:
 It is completely wrong to ever do that and to restart udev or other
 essential sevices from packages. No package besides udev itself is
 allowed to do restart these services

and not only in the context of udev

it is GENERALLY wrong
it is wrong to restart httpd
it is wrong to restart mysqld

it is GENERALLY wrong to cripple this in any fedora package
instead AT LEAST have this controlled by a global setting

what do packagers imagine to happen by restart mysqld on machines
where a lot of services depend on mysqld.service and randomly
failing while the admin is EXACTLY knowing what he is doing
and which services in which order he has to restart to get
a new mysqld, httpd whatever version actibe?

and yes, this is one reason i have to rebuild a lot of packages
at my own to get rid of this completly wrong behavior breaking
randomly stuff in a uncontrollable way




signature.asc
Description: OpenPGP digital signature
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel

Re: how reload udev rules and systemd on F18

2013-01-29 Thread Sérgio Basto
On Ter, 2013-01-29 at 01:52 +0100, Lennart Poettering wrote:
  like : 
  cat /etc/udev/rules.d/90-vboxdrv.rules 
  SUBSYSTEM==usb_device, ACTION==add, RUN+=VBoxCreateUSBNode.sh
  $major $minor $attr{bDeviceClass} vboxusers
  SUBSYSTEM==usb, ACTION==add, ENV{DEVTYPE}==usb_device, RUN
  +=VBoxCreateUSBNode.sh $major $minor $attr{bDeviceClass} vboxusers
  SUBSYSTEM==usb_device, ACTION==remove, RUN
 +=VBoxCreateUSBNode.sh
  --remove $major $minor
  SUBSYSTEM==usb, ACTION==remove, ENV{DEVTYPE}==usb_device, RUN
  +=VBoxCreateUSBNode.sh --remove $major $minor
 
 Ahum, you are aware that this will run your script for any USB device
 plugged in? Which Fedora package includes this? This code really looks
 really not right. 

vboxdrv should give you a hint , VirtualBox drives 

I need add some USB udev rules ... 
After insert 90-vboxdrv.rules , I need reload rules didn't I ? 

Thanks, 
-- 
Sérgio M. B.

-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel

Re: how reload udev rules and systemd on F18

2013-01-29 Thread Sérgio Basto
On Ter, 2013-01-29 at 01:52 +0100, Lennart Poettering wrote:
 Yes, even then. udev will notice rules dropped there.

OK I will test that 

Many thanks, 
-- 
Sérgio M. B.

-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel

Re: how reload udev rules and systemd on F18

2013-01-28 Thread Kay Sievers
On Sat, Jan 26, 2013 at 6:14 AM, Sérgio Basto ser...@serjux.com wrote:
 how I should do the old command udevadm: control --reload-rules ?
 is correct : systemctl restart udev.service ?
 I don't find any in documentation that guarantee this .

 BTW in F18: udev.service change the name to systemd-udevd.service.
 So put in package spec, is this correct way ?

 %if 0%{?fedora}  18
 systemctl restart udev.service
 systemctl restart udev-trigger.service
 systemctl restart udev-settle.service
 %else
 systemctl restart systemd-udevd.service
 systemctl restart systemd-udev-trigger.service
 systemctl restart systemd-udev-settle.service
 %endif

Please get rid of all of that, none of it is necessary, udev will
notice that on its own.

It is completely wrong to ever do that and to restart udev or other
essential sevices from packages. No package besides udev itself is
allowed to do restart these services.

Thanks,
Kay
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel

Re: how reload udev rules and systemd on F18

2013-01-28 Thread Sérgio Basto
On Ter, 2013-01-29 at 00:50 +0100, Kay Sievers wrote: 
 On Sat, Jan 26, 2013 at 6:14 AM, Sérgio Basto ser...@serjux.com wrote:
  how I should do the old command udevadm: control --reload-rules ?
  is correct : systemctl restart udev.service ?
  I don't find any in documentation that guarantee this .
 
  BTW in F18: udev.service change the name to systemd-udevd.service.
  So put in package spec, is this correct way ?
 
  %if 0%{?fedora}  18
  systemctl restart udev.service
  systemctl restart udev-trigger.service
  systemctl restart udev-settle.service
  %else
  systemctl restart systemd-udevd.service
  systemctl restart systemd-udev-trigger.service
  systemctl restart systemd-udev-settle.service
  %endif
 
 Please get rid of all of that, none of it is necessary, udev will
 notice that on its own.
 
 It is completely wrong to ever do that and to restart udev or other
 essential services from packages. No package besides udev itself is
 allowed to do restart these services.


Hi, 
Even when package adds some rules to /etc/udev/rules.d ? 
like : 
cat /etc/udev/rules.d/90-vboxdrv.rules 
SUBSYSTEM==usb_device, ACTION==add, RUN+=VBoxCreateUSBNode.sh
$major $minor $attr{bDeviceClass} vboxusers
SUBSYSTEM==usb, ACTION==add, ENV{DEVTYPE}==usb_device, RUN
+=VBoxCreateUSBNode.sh $major $minor $attr{bDeviceClass} vboxusers
SUBSYSTEM==usb_device, ACTION==remove, RUN+=VBoxCreateUSBNode.sh
--remove $major $minor
SUBSYSTEM==usb, ACTION==remove, ENV{DEVTYPE}==usb_device, RUN
+=VBoxCreateUSBNode.sh --remove $major $minor


Thanks,
-- 
Sérgio M. B.

-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel

Re: how reload udev rules and systemd on F18

2013-01-28 Thread Lennart Poettering
On Tue, 29.01.13 00:36, Sérgio Basto (ser...@serjux.com) wrote:

 On Ter, 2013-01-29 at 00:50 +0100, Kay Sievers wrote: 
  On Sat, Jan 26, 2013 at 6:14 AM, Sérgio Basto ser...@serjux.com wrote:
   how I should do the old command udevadm: control --reload-rules ?
   is correct : systemctl restart udev.service ?
   I don't find any in documentation that guarantee this .
  
   BTW in F18: udev.service change the name to systemd-udevd.service.
   So put in package spec, is this correct way ?
  
   %if 0%{?fedora}  18
   systemctl restart udev.service
   systemctl restart udev-trigger.service
   systemctl restart udev-settle.service
   %else
   systemctl restart systemd-udevd.service
   systemctl restart systemd-udev-trigger.service
   systemctl restart systemd-udev-settle.service
   %endif
  
  Please get rid of all of that, none of it is necessary, udev will
  notice that on its own.
  
  It is completely wrong to ever do that and to restart udev or other
  essential services from packages. No package besides udev itself is
  allowed to do restart these services.
 
 
 Hi, 
 Even when package adds some rules to /etc/udev/rules.d ? 

Yes, even then. udev will notice rules dropped there.

 like : 
 cat /etc/udev/rules.d/90-vboxdrv.rules 
 SUBSYSTEM==usb_device, ACTION==add, RUN+=VBoxCreateUSBNode.sh
 $major $minor $attr{bDeviceClass} vboxusers
 SUBSYSTEM==usb, ACTION==add, ENV{DEVTYPE}==usb_device, RUN
 +=VBoxCreateUSBNode.sh $major $minor $attr{bDeviceClass} vboxusers
 SUBSYSTEM==usb_device, ACTION==remove, RUN+=VBoxCreateUSBNode.sh
 --remove $major $minor
 SUBSYSTEM==usb, ACTION==remove, ENV{DEVTYPE}==usb_device, RUN
 +=VBoxCreateUSBNode.sh --remove $major $minor

Ahum, you are aware that this will run your script for any USB device
plugged in? Which Fedora package includes this? This code really looks
really not right.

Lennart

-- 
Lennart Poettering - Red Hat, Inc.
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel

how reload udev rules and systemd on F18

2013-01-25 Thread Sérgio Basto
Hi, 
how I should do the old command udevadm: control --reload-rules ?
is correct : systemctl restart udev.service ?
I don't find any in documentation that guarantee this .

BTW in F18: udev.service change the name to systemd-udevd.service.
So put in package spec, is this correct way ?

%if 0%{?fedora}  18
systemctl restart udev.service 
systemctl restart udev-trigger.service
systemctl restart udev-settle.service
%else
systemctl restart systemd-udevd.service
systemctl restart systemd-udev-trigger.service
systemctl restart systemd-udev-settle.service
%endif

Thanks,
-- 
Sérgio M. B.

-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel