create /run on demand

This commit is contained in:
IgnorantGuru 2013-02-11 07:02:49 -07:00
parent a96f930765
commit f4bcd1f572
2 changed files with 3 additions and 0 deletions

View File

@ -3,6 +3,7 @@
[devmon] get pmount mount point after mount #20
move debian/ to distros/debian/ and update README
fix -t with net fstype without protocol
create /run on demand
0.3.6 2012-12-16:
file mount prevent race conditions
disallow remount of file due to potential race conditions

View File

@ -2307,6 +2307,8 @@ static gboolean create_run_media()
char* run_media = g_build_filename( "/run/media", g_get_user_name(), NULL );
restore_privileges();
wlog( "udevil: mkdir %s\n", run_media, 0 );
mkdir( "/run", S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH );
chown( "/run", 0, 0 );
mkdir( "/run/media", S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH );
chown( "/run/media", 0, 0 );
mkdir( run_media, S_IRWXU );