]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
init: set old umask before switch_root
authorHarald Hoyer <harald@redhat.com>
Mon, 2 Aug 2010 09:28:16 +0000 (11:28 +0200)
committerHarald Hoyer <harald@redhat.com>
Mon, 2 Aug 2010 12:17:59 +0000 (14:17 +0200)
modules.d/99base/init

index 8938dfb6ae8d7e4f533a972f26f9cb4bded3acd3..604eee6b600e826ac53b39719ba60057cbc072cd 100755 (executable)
@@ -63,6 +63,7 @@ NEWROOT="/sysroot"
 
 trap "emergency_shell Signal caught!" 0
 # set umask
+OLD_UMASK=$(umask)
 umask 0007
 
 RDDEBUG=""
@@ -312,6 +313,8 @@ info "Switching root"
 
 wait_for_loginit
 
+umask $OLD_UMASK
+
 exec switch_root "$NEWROOT" "$INIT" $initargs || {
     echo "Something went very badly wrong in the initramfs.  Please "
     echo "file a bug against dracut."