Skip to contentSkip to conversation

initscripts: mount and unmount cifs network filesystems

PATCH Superseded Andreas Oberritter 2 participants 4 messages Feb 24, 2012 – Feb 26, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 initscripts: mount and unmount cifs network filesystems

* Added cifs to mountnfs.sh and umountnfs.sh.

---
 .../initscripts/initscripts-1.0/mountnfs.sh        |    8 +++++++-
 .../initscripts/initscripts-1.0/umountnfs.sh       |    2 +-
 meta/recipes-core/initscripts/initscripts_1.0.bb   |    2 +-
 3 files changed, 9 insertions(+), 3 deletions(-)
meta/recipes-core/initscripts/initscripts-1.0/mountnfs.sh +7 -1
index 859fc9e..82ec7f6 100755
@@ -23,6 +23,7 @@ portmap=no
 mount_nfs=no
 mount_smb=no
 mount_ncp=no
+mount_cifs=no
 while read device mountpt fstype options
 do
 	case "$device" in
@@ -56,6 +57,10 @@ do
 	then
 		mount_ncp=yes
 	fi
+	if test "$fstype" = cifs
+	then
+		mount_cifs=yes
+	fi
 done
 
 exec 0>&1
@@ -70,12 +75,13 @@ then
 	fi
 fi
 
-if test "$mount_nfs" = yes || test "$mount_smb" = yes || test "$mount_ncp" = yes
+if test "$mount_nfs" = yes || test "$mount_smb" = yes || test "$mount_ncp" = yes || test "$mount_cifs" = yes
 then
 	echo "Mounting remote filesystems..."
 	test "$mount_nfs" = yes && mount -a -t nfs
 	test "$mount_smb" = yes && mount -a -t smbfs
 	test "$mount_ncp" = yes && mount -a -t ncpfs
+	test "$mount_cifs" = yes && mount -a -t cifs
 fi
 
 ) < /etc/fstab
meta/recipes-core/initscripts/initscripts-1.0/umountnfs.sh +1 -1
index 15d1f73..af07540 100755
@@ -23,7 +23,7 @@ test -f /etc/fstab && (
 #
 while read device mountpt fstype options
 do
-	if test "$fstype" = nfs ||  test "$fstype" = smbfs ||  test "$fstype" = ncpfs
+	if test "$fstype" = nfs ||  test "$fstype" = smbfs ||  test "$fstype" = ncpfs || test "$fstype" = cifs
 	then
 		umount -f $mountpt
 	fi
meta/recipes-core/initscripts/initscripts_1.0.bb +1 -1
index 203c605..b56c55c 100644
@@ -3,7 +3,7 @@ DESCRIPTION = "Initscripts provide the basic system startup initialization scrip
 SECTION = "base"
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
-PR = "r129"
+PR = "r130"
 
 INHIBIT_DEFAULT_DEPS = "1"
 
Signature · 1 line
1.7.5.4
#1 lore raw
Quoted 2 lines · Andreas Oberritter

* Added cifs to mountnfs.sh and umountnfs.sh.

This patch appears to need to be rebased.

Thanks
Sau!

Quoted 71 lines
---
  .../initscripts/initscripts-1.0/mountnfs.sh        |    8 +++++++-
  .../initscripts/initscripts-1.0/umountnfs.sh       |    2 +-
  meta/recipes-core/initscripts/initscripts_1.0.bb   |    2 +-
  3 files changed, 9 insertions(+), 3 deletions(-)
meta/recipes-core/initscripts/initscripts-1.0/mountnfs.sh +7 -1
index 859fc9e..82ec7f6 100755
@@ -23,6 +23,7 @@ portmap=no
  mount_nfs=no
  mount_smb=no
  mount_ncp=no
+mount_cifs=no
  while read device mountpt fstype options
  do
  	case "$device" in
@@ -56,6 +57,10 @@ do
  	then
  		mount_ncp=yes
  	fi
+	if test "$fstype" = cifs
+	then
+		mount_cifs=yes
+	fi
  done
 
  exec 0>&1
@@ -70,12 +75,13 @@ then
  	fi
  fi
 
-if test "$mount_nfs" = yes || test "$mount_smb" = yes || test "$mount_ncp" = yes
+if test "$mount_nfs" = yes || test "$mount_smb" = yes || test "$mount_ncp" = yes || test "$mount_cifs" = yes
  then
  	echo "Mounting remote filesystems..."
  	test "$mount_nfs" = yes&&  mount -a -t nfs
  	test "$mount_smb" = yes&&  mount -a -t smbfs
  	test "$mount_ncp" = yes&&  mount -a -t ncpfs
+	test "$mount_cifs" = yes&&  mount -a -t cifs
  fi
 
  )<  /etc/fstab
meta/recipes-core/initscripts/initscripts-1.0/umountnfs.sh +1 -1
index 15d1f73..af07540 100755
@@ -23,7 +23,7 @@ test -f /etc/fstab&&  (
  #
  while read device mountpt fstype options
  do
-	if test "$fstype" = nfs ||  test "$fstype" = smbfs ||  test "$fstype" = ncpfs
+	if test "$fstype" = nfs ||  test "$fstype" = smbfs ||  test "$fstype" = ncpfs || test "$fstype" = cifs
  	then
  		umount -f $mountpt
  	fi
meta/recipes-core/initscripts/initscripts_1.0.bb +1 -1
index 203c605..b56c55c 100644
@@ -3,7 +3,7 @@ DESCRIPTION = "Initscripts provide the basic system startup initialization scrip
  SECTION = "base"
  LICENSE = "GPLv2"
  LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
-PR = "r129"
+PR = "r130"
 
  INHIBIT_DEFAULT_DEPS = "1"
 
#2 lore raw

PATCH v2 1/1 initscripts: mount and unmount cifs network filesystems

* Added cifs to mountnfs.sh and umountnfs.sh.

---
* Rebased as requested

 .../initscripts/initscripts-1.0/mountnfs.sh        |    8 +++++++-
 .../initscripts/initscripts-1.0/umountnfs.sh       |    2 +-
 meta/recipes-core/initscripts/initscripts_1.0.bb   |    2 +-
 3 files changed, 9 insertions(+), 3 deletions(-)
meta/recipes-core/initscripts/initscripts-1.0/mountnfs.sh +7 -1
index 859fc9e..82ec7f6 100755
@@ -23,6 +23,7 @@ portmap=no
 mount_nfs=no
 mount_smb=no
 mount_ncp=no
+mount_cifs=no
 while read device mountpt fstype options
 do
 	case "$device" in
@@ -56,6 +57,10 @@ do
 	then
 		mount_ncp=yes
 	fi
+	if test "$fstype" = cifs
+	then
+		mount_cifs=yes
+	fi
 done
 
 exec 0>&1
@@ -70,12 +75,13 @@ then
 	fi
 fi
 
-if test "$mount_nfs" = yes || test "$mount_smb" = yes || test "$mount_ncp" = yes
+if test "$mount_nfs" = yes || test "$mount_smb" = yes || test "$mount_ncp" = yes || test "$mount_cifs" = yes
 then
 	echo "Mounting remote filesystems..."
 	test "$mount_nfs" = yes && mount -a -t nfs
 	test "$mount_smb" = yes && mount -a -t smbfs
 	test "$mount_ncp" = yes && mount -a -t ncpfs
+	test "$mount_cifs" = yes && mount -a -t cifs
 fi
 
 ) < /etc/fstab
meta/recipes-core/initscripts/initscripts-1.0/umountnfs.sh +1 -1
index 15d1f73..af07540 100755
@@ -23,7 +23,7 @@ test -f /etc/fstab && (
 #
 while read device mountpt fstype options
 do
-	if test "$fstype" = nfs ||  test "$fstype" = smbfs ||  test "$fstype" = ncpfs
+	if test "$fstype" = nfs ||  test "$fstype" = smbfs ||  test "$fstype" = ncpfs || test "$fstype" = cifs
 	then
 		umount -f $mountpt
 	fi
meta/recipes-core/initscripts/initscripts_1.0.bb +1 -1
index b56c55c..e16f19f 100644
@@ -3,7 +3,7 @@ DESCRIPTION = "Initscripts provide the basic system startup initialization scrip
 SECTION = "base"
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
-PR = "r130"
+PR = "r131"
 
 INHIBIT_DEFAULT_DEPS = "1"
 
Signature · 1 line
1.7.5.4
Applied
#3 lore raw
Quoted 67 lines · Andreas Oberritter

* Added cifs to mountnfs.sh and umountnfs.sh.

---
* Rebased as requested

  .../initscripts/initscripts-1.0/mountnfs.sh        |    8 +++++++-
  .../initscripts/initscripts-1.0/umountnfs.sh       |    2 +-
  meta/recipes-core/initscripts/initscripts_1.0.bb   |    2 +-
  3 files changed, 9 insertions(+), 3 deletions(-)
meta/recipes-core/initscripts/initscripts-1.0/mountnfs.sh +7 -1
index 859fc9e..82ec7f6 100755
@@ -23,6 +23,7 @@ portmap=no
  mount_nfs=no
  mount_smb=no
  mount_ncp=no
+mount_cifs=no
  while read device mountpt fstype options
  do
  	case "$device" in
@@ -56,6 +57,10 @@ do
  	then
  		mount_ncp=yes
  	fi
+	if test "$fstype" = cifs
+	then
+		mount_cifs=yes
+	fi
  done
 
  exec 0>&1
@@ -70,12 +75,13 @@ then
  	fi
  fi
 
-if test "$mount_nfs" = yes || test "$mount_smb" = yes || test "$mount_ncp" = yes
+if test "$mount_nfs" = yes || test "$mount_smb" = yes || test "$mount_ncp" = yes || test "$mount_cifs" = yes
  then
  	echo "Mounting remote filesystems..."
  	test "$mount_nfs" = yes&&  mount -a -t nfs
  	test "$mount_smb" = yes&&  mount -a -t smbfs
  	test "$mount_ncp" = yes&&  mount -a -t ncpfs
+	test "$mount_cifs" = yes&&  mount -a -t cifs
  fi
 
  )<  /etc/fstab
meta/recipes-core/initscripts/initscripts-1.0/umountnfs.sh +1 -1
index 15d1f73..af07540 100755
@@ -23,7 +23,7 @@ test -f /etc/fstab&&  (
  #
  while read device mountpt fstype options
  do
-	if test "$fstype" = nfs ||  test "$fstype" = smbfs ||  test "$fstype" = ncpfs
+	if test "$fstype" = nfs ||  test "$fstype" = smbfs ||  test "$fstype" = ncpfs || test "$fstype" = cifs
  	then
  		umount -f $mountpt
  	fi
meta/recipes-core/initscripts/initscripts_1.0.bb +0 -0
index b56c55c..e16f19f 100644

meta/recipes-core/initscripts/initscripts_1.0.bb DESCRIPTION = "Initscripts provide the basic system startup initialization scrip · line 9

Quoted 8 lines
meta/recipes-core/initscripts/initscripts_1.0.bb +1 -1
@@ -3,7 +3,7 @@ DESCRIPTION = "Initscripts provide the basic system startup initialization scrip
  SECTION = "base"
  LICENSE = "GPLv2"
  LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
-PR = "r130"
+PR = "r131"
 
  INHIBIT_DEFAULT_DEPS = "1"
 

Merged into OE-core

Thanks
Sau!