summaryrefslogtreecommitdiffstats
path: root/sys-apps/mkinitrd/files/mkinitrd-ds.patch
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@suren.me>2019-09-01 00:00:32 +0200
committerSuren A. Chilingaryan <csa@suren.me>2019-09-01 00:00:32 +0200
commitca9627e70852f6b2e835660df870fe3ab405882d (patch)
tree0a008b1d5b16fa0679a195ed7b5662c7891f591c /sys-apps/mkinitrd/files/mkinitrd-ds.patch
downloaddarklin4-ca9627e70852f6b2e835660df870fe3ab405882d.tar.gz
darklin4-ca9627e70852f6b2e835660df870fe3ab405882d.tar.bz2
darklin4-ca9627e70852f6b2e835660df870fe3ab405882d.tar.xz
darklin4-ca9627e70852f6b2e835660df870fe3ab405882d.zip
Initial import
Diffstat (limited to 'sys-apps/mkinitrd/files/mkinitrd-ds.patch')
-rw-r--r--sys-apps/mkinitrd/files/mkinitrd-ds.patch42
1 files changed, 42 insertions, 0 deletions
diff --git a/sys-apps/mkinitrd/files/mkinitrd-ds.patch b/sys-apps/mkinitrd/files/mkinitrd-ds.patch
new file mode 100644
index 0000000..10d4871
--- /dev/null
+++ b/sys-apps/mkinitrd/files/mkinitrd-ds.patch
@@ -0,0 +1,42 @@
+diff -dPNur mkinitrd-4.2.17/mkinitrd mkinitrd-4.2.17-csa/mkinitrd
+--- mkinitrd-4.2.17/mkinitrd 2005-10-28 07:35:15.000000000 +0000
++++ mkinitrd-4.2.17-csa/mkinitrd 2005-10-28 07:40:56.000000000 +0000
+@@ -61,6 +61,8 @@
+
+ [ -f /etc/sysconfig/mkinitrd ] && source /etc/sysconfig/mkinitrd
+
++mount /boot &> /dev/null
++
+ usage () {
+ echo "usage: `basename $0` [--version] [-v] [-f] [--preload <module>]" >&2
+ echo " [--with=<module>] [--omit-scsi-modules] [--omit-raid-modules]" >&2
+@@ -1134,6 +1136,8 @@
+ echo "pivot_root /sysroot /sysroot/initrd" >> $RCFILE
+ [ -n "$kernel25" ] && echo "umount /initrd/sys" >> $RCFILE
+ echo "umount /initrd/proc" >> $RCFILE
++ echo "umount /initrd/dev" >> $RCFILE
++ echo "umount /initrd" >> $RCFILE
+ fi
+ else
+ [ -n "$readonly" ] && echo "umount /dev" >> $RCFILE
+@@ -1154,7 +1158,7 @@
+
+ case $initrdfs in
+ ext2|ext3|minix)
+- for i in `/bin/find $MNTIMAGE -printf '%k\n'`; do
++ for i in `find $MNTIMAGE -printf '%k\n'`; do
+ IMAGESIZE=$[IMAGESIZE + $i]
+ NB_INODES=$[NB_INODES + 1]
+ done
+diff -dPNur mkinitrd-4.2.17/nash/nash.c mkinitrd-4.2.17-csa/nash/nash.c
+--- mkinitrd-4.2.17/nash/nash.c 2005-10-28 07:35:15.000000000 +0000
++++ mkinitrd-4.2.17-csa/nash/nash.c 2005-10-28 07:35:22.000000000 +0000
+@@ -1078,7 +1078,7 @@
+ return 1;
+ }
+
+- if (umount(path)) {
++ if (umount2(path,MNT_DETACH)) {
+ printf("umount %s failed: %d\n", path, errno);
+ return 1;
+ }