Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
udev rule to hide partitions do not work
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
brain salad surgery
Apprentice
Apprentice


Joined: 21 Apr 2004
Posts: 216

PostPosted: Tue May 28, 2013 8:57 pm    Post subject: udev rule to hide partitions do not work Reply with quote

I don't understand what's wrong with this udev rule:

cat /etc/udev/rules.d/10-hide-partitions.rules
Code:
ACTION!="add|change", GOTO="hide_partition_end"
SUBSYSTEM!="block", GOTO="hide_partition_end"
KERNEL=="loop*|ram*", GOTO="hide_partition_end"

KERNEL=="sda3",ENV{UDISKS_PRESENTATION_HIDE}="1"
KERNEL=="sda4",ENV{UDISKS_PRESENTATION_HIDE}="1"
KERNEL=="sda1",ENV{UDISKS_PRESENTATION_HIDE}="1"

LABEL="hide_partition_end"


the partitions still appear under gnome.

The rule is read, as shown in this udev debug output:
Code:
udevadm --debug test /
custom logging function 0x7f6b8a048250 registered
selinux=0
main: runtime dir '/run/udev'
run_command: calling: test
adm_test: version 175
This program is for debugging only, it does not run any program,
specified by a RUN key. It may show incorrect results, because
some values may be different, or not available at a simulation run.

parse_file: reading '/etc/udev/rules.d/10-hide-partitions.rules' as rules file
parse_file: reading '/lib/udev/rules.d/40-crda.rules' as rules file
parse_file: reading '/lib/udev/rules.d/40-fuse.rules' as rules file
parse_file: reading '/lib/udev/rules.d/40-gnupg.rules' as rules file
parse_file: reading '/lib/udev/rules.d/40-hplip.rules' as rules file


kernel : 3.2.0-24-generic
udev --version gives 175
Back to top
View user's profile Send private message
brain salad surgery
Apprentice
Apprentice


Joined: 21 Apr 2004
Posts: 216

PostPosted: Thu May 30, 2013 3:38 pm    Post subject: Reply with quote

hey ? no one ?

come on, there must someone that knows what i am talking about...
Back to top
View user's profile Send private message
salahx
Guru
Guru


Joined: 12 Mar 2005
Posts: 530

PostPosted: Fri May 31, 2013 4:22 am    Post subject: Reply with quote

Try UDISKS_IGNORE instead of UDISKS_PRESENTATION_HIDE
Back to top
View user's profile Send private message
brain salad surgery
Apprentice
Apprentice


Joined: 21 Apr 2004
Posts: 216

PostPosted: Fri May 31, 2013 12:26 pm    Post subject: Reply with quote

No more luck with this file:


Code:
ACTION!="add|change", GOTO="hide_partition_end"
SUBSYSTEM!="block", GOTO="hide_partition_end"
KERNEL=="loop*|ram*", GOTO="hide_partition_end"

KERNEL=="sda3",ENV{UDISKS_IGNORE}="1"
KERNEL=="sda4",ENV{UDISKS_IGNORE}="1"
KERNEL=="sda1",ENV{UDISKS_IGNORE}="1"

LABEL="hide_partition_end"



Any other idea ??? Couldn't a secret !
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Fri May 31, 2013 3:15 pm    Post subject: Reply with quote

Try adding a space after the comma, like in all the examples.
Back to top
View user's profile Send private message
brain salad surgery
Apprentice
Apprentice


Joined: 21 Apr 2004
Posts: 216

PostPosted: Fri May 31, 2013 3:43 pm    Post subject: Reply with quote

added the spaces, but doesn't work
Back to top
View user's profile Send private message
sebB
l33t
l33t


Joined: 02 Mar 2011
Posts: 806
Location: S.O. France

PostPosted: Fri May 31, 2013 5:55 pm    Post subject: Reply with quote

Quote:
ACTION!="add|change", GOTO="hide_partition_end"
SUBSYSTEM!="block", GOTO="hide_partition_end"
KERNEL=="loop*|ram*", GOTO="hide_partition_end"
.
.
LABEL="hide_partition_end"

Try adding a s to partition

Quote:
ACTION!="add|change", GOTO="hide_partitions_end"
SUBSYSTEM!="block", GOTO="hide_partitions_end"
KERNEL=="loop*|ram*", GOTO="hide_partitions_end"

KERNEL=="sda3",ENV{UDISKS_PRESENTATION_HIDE}="1"
KERNEL=="sda4",ENV{UDISKS_PRESENTATION_HIDE}="1"
KERNEL=="sda1",ENV{UDISKS_PRESENTATION_HIDE}="1"

LABEL="hide_partitions_end"

Back to top
View user's profile Send private message
brain salad surgery
Apprentice
Apprentice


Joined: 21 Apr 2004
Posts: 216

PostPosted: Fri May 31, 2013 6:29 pm    Post subject: Reply with quote

doesn't work
Back to top
View user's profile Send private message
sebB
l33t
l33t


Joined: 02 Mar 2011
Posts: 806
Location: S.O. France

PostPosted: Fri May 31, 2013 6:42 pm    Post subject: Reply with quote

Strange, did you reload the rules or restart computer?
Back to top
View user's profile Send private message
brain salad surgery
Apprentice
Apprentice


Joined: 21 Apr 2004
Posts: 216

PostPosted: Fri May 31, 2013 7:08 pm    Post subject: Reply with quote

always restart

strange indeed, but it's not magic, there is a solution
Back to top
View user's profile Send private message
brain salad surgery
Apprentice
Apprentice


Joined: 21 Apr 2004
Posts: 216

PostPosted: Sun Jun 02, 2013 4:35 pm    Post subject: Reply with quote

lol, as usual, no one knows anything [Mod edit for language − JRG] here !!
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 10589
Location: Somewhere over Atlanta, Georgia

PostPosted: Sun Jun 02, 2013 9:36 pm    Post subject: Reply with quote

@brain salad surgery, please keep the language G rated here, in compliance with the Forum Guidelines.

- John
_________________
I can confirm that I have received between 0 and 499 National Security Letters.
Back to top
View user's profile Send private message
brain salad surgery
Apprentice
Apprentice


Joined: 21 Apr 2004
Posts: 216

PostPosted: Sun Jun 02, 2013 10:03 pm    Post subject: Reply with quote

lol, yeah, that's all you're able to do, change the sections of posts and warn about language
what about finding answers ???

waste of time, and only losers here
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 10589
Location: Somewhere over Atlanta, Georgia

PostPosted: Sun Jun 02, 2013 11:10 pm    Post subject: Reply with quote

Fare thee well.

- John
_________________
I can confirm that I have received between 0 and 499 National Security Letters.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum