[projects/geninitrd] preserve permissions when copying to initrd

glen glen at pld-linux.org
Sat May 16 00:33:01 CEST 2015


commit b9c1a1c5c0fe0ad7145893c22e9ca1b4edaad344
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Sat May 16 01:32:05 2015 +0300

    preserve permissions when copying to initrd
    
    initramfs has permissions and timestamps compared to romfs, so preserve
    original file permissions, instead being affected from umask when
    geninitrd was ran

 geninitrd | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/geninitrd b/geninitrd
index 6ad6820..bedd738 100755
--- a/geninitrd
+++ b/geninitrd
@@ -505,7 +505,7 @@ inst() {
 		mkdir -p $parentDir
 	fi
 	verbose "+ cp $* DESTDIR$dest"
-	cp -HR "$@" "$DESTDIR$dest"
+	cp -HRp "$@" "$DESTDIR$dest"
 }
 
 inst_d() {
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/projects/geninitrd.git/commitdiff/b9c1a1c5c0fe0ad7145893c22e9ca1b4edaad344



More information about the pld-cvs-commit mailing list