Please take our Survey
logo       

Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

[SSI] openssi/distro-pkgs/redhat/initscripts/rc.d halt.node,1.1.2.2,1.1.2.3: msg#00082

Subject: [SSI] openssi/distro-pkgs/redhat/initscripts/rc.d halt.node,1.1.2.2,1.1.2.3
Update of /cvsroot/ssic-linux/openssi/distro-pkgs/redhat/initscripts/rc.d
In directory 
sc8-pr-cvs1:/tmp/cvs-serv31986/openssi/distro-pkgs/redhat/initscripts/rc.d

Modified Files:
      Tag: OPENSSI-RH
        halt.node 
Log Message:
Fix umount to be only local
        Parse /proc/mounts to only look at local entries
                 (without ssidev as device)


Index: halt.node
===================================================================
RCS file: 
/cvsroot/ssic-linux/openssi/distro-pkgs/redhat/initscripts/rc.d/Attic/halt.node,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -C2 -d -r1.1.2.2 -r1.1.2.3
*** halt.node   25 Sep 2003 00:49:12 -0000      1.1.2.2
--- halt.node   15 Nov 2003 01:42:38 -0000      1.1.2.3
***************
*** 24,40 ****
  }
  
- # Redhat 9 version (merge)
- #halt_get_remaining() {
- #     awk '$2 ~ /^\/$|^\/proc|^\/dev/{next}
- #          $3 == "tmpfs" || $3 == "proc" {print $2 ; next}
- #          /(^#|loopfs|autofs|devfs|^none|^\/dev\/root)/ {next}
- #          {print $2}' /proc/mounts
- #}
  halt_get_remaining() {
!       awk '!/(^#|proc|loopfs|autofs|devfs|^none|^\/dev\/root| \/ )/ {print 
$2}' /proc/mounts | grep -v ^/dev$ | grep -v '^/cluster/node.*/dev$'
! # SSI_XXX: Temporary hack added until we can get /initrd/proc to umount
!       awk '{ if ($3 ~ /^proc$/ && $2 !~ /^\/proc/) print $2; }' /proc/mounts\
!               | grep -v ^/initrd/proc$
!       awk '{ if ($3 ~ /^tmpfs$/ && $2 !~ /^\/dev/) print $2; }' /proc/mounts
  }
  
--- 24,32 ----
  }
  
  halt_get_remaining() {
!       grep -v '^[0-9a-f]* ' /proc/mounts | awk '$2 ~ 
/^\/$|^\/proc|^\/dev/{next}
!            $3 == "tmpfs" || $3 == "proc" {print $2 ; next}
!            /(^#|loopfs|autofs|devfs|^none|^\/dev\/root)/ {next}
!            {print $2}'
  }
  
***************
*** 98,103 ****
  # Unmount file systems, killing processes if we have to.
  # Unmount loopback stuff first
! remaining=`awk '!/^#/ && $1 ~ /^\/dev\/loop/ && $2 != "/" {print $2}' 
/proc/mounts | grep -v ^/dev$ | grep -v '^/cluster/node.*/dev$'`
! devremaining=`awk '!/^#/ && $1 ~ /^\/dev\/loop/ && $2 != "/" {print $1}' 
/proc/mounts`
  [ -n "$remaining" ] && {
        sig=
--- 90,95 ----
  # Unmount file systems, killing processes if we have to.
  # Unmount loopback stuff first
! remaining=`grep -v '^[0-9a-f]* ' /proc/mounts | awk '!/^#/ && $1 ~ 
/^\/dev\/loop/ && $2 != "/" {print $2}' `
! devremaining=`grep -v '^[0-9a-f]* ' /proc/mounts | awk '!/^#/ && $1 ~ 
/^\/dev\/loop/ && $2 != "/" {print $1}' `
  [ -n "$remaining" ] && {
        sig=
***************
*** 114,119 ****
                                runcmd $"Detaching loopback device $dev: " 
losetup -d $dev
                done
!               remaining=`awk '!/^#/ && $1 ~ /^\/dev\/loop/ && $2 != "/" 
{print $2}' /proc/mounts | grep -v ^/dev$ | grep -v '^/cluster/node.*/dev$'`
!               devremaining=`awk '!/^#/ && $1 ~ /^\/dev\/loop/ && $2 != "/" 
{print $1}' /proc/mounts`
                [ -z "$remaining" ] && break
                /sbin/fuser -k -m $sig $remaining >/dev/null
--- 106,111 ----
                                runcmd $"Detaching loopback device $dev: " 
losetup -d $dev
                done
!               remaining=`grep -v '^[0-9a-f]* ' /proc/mounts | awk '!/^#/ && 
$1 ~ /^\/dev\/loop/ && $2 != "/" {print $2}' `
!               devremaining=`grep -v '^[0-9a-f]* ' /proc/mounts | awk '!/^#/ 
&& $1 ~ /^\/dev\/loop/ && $2 != "/" {print $1}' `
                [ -z "$remaining" ] && break
                /sbin/fuser -k -m $sig $remaining >/dev/null




-------------------------------------------------------
This SF. Net email is sponsored by: GoToMyPC
GoToMyPC is the fast, easy and secure way to access your computer from
any Web browser or wireless device. Click here to Try it Free!
https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
hardware.arm.at...    cms.citadel.dev...    video.gstreamer...    java.facelets.u...    misc.basics.qna...    web.wiki.instik...    network.uip.use...    xdg.devel/2003-...    tex.bibtex.bibd...    finance.quotesp...    ietf.zeroconf/2...    redhat.blinux.g...    suse.db2/2003-0...    php.phpesp/2004...    uml.devel/2003-...    gnome.labyrinth...    qnx.openqnx.dev...    boot-loaders.gr...    db.dataperfect....    audio.audacity....    linux.uclinux.m...    editors.j.devel...    os.openbsd.tech...    kde.users.multi...   
Home | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe

Navigation