home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / boot / i386 / root / usr / share / YaST2 / scrconf / run_swapon_s.scr < prev    next >
Encoding:
Text File  |  2006-11-29  |  900 b   |  41 lines

  1. /**
  2.  * File:
  3.  *   run_swapon_s.scr
  4.  * Summary:
  5.  *   SCR Agent for reading the result from "/sbin/swapon -s"
  6.  * Access:
  7.  *   read-only
  8.  * Authors:
  9.  *   Unknown <yast2-hacker@suse.de>
  10.  * See:
  11.  *   anyagent
  12.  *   libscr
  13.  *   man swapon(8)
  14.  *   man swapoff(8)
  15.  *   man mkswap(8)
  16.  * Example:
  17.  *   Read(.run.swapon_s)
  18.  *   ($["/sda2":"                       partition\t265064\t2632\t-1"])
  19.  * 
  20.  * $Id: run_swapon_s.scr 13018 2003-12-11 12:52:53Z jhumpol $
  21.  *
  22.  * Returns a <b>map</b> of swap partitions. The key is the device file 
  23.  * (minus /dev), the value is the remaining information as string.
  24.  */
  25. .run.swapon_s
  26.  
  27. `ag_anyagent(
  28.   `Description (
  29.       (`Run("/sbin/swapon -s")),
  30.       "\n",            // Comment
  31.       true,            // read-only
  32.       (`Tuple (
  33.       `Choice (
  34.         [ "/dev", `Sequence (`Name(`String("^ \t")), `Value(`String("^\n"))) ],
  35.         [ "", `String("^\n") ]
  36.       ),
  37.       `Continue ("\n")
  38.       ))
  39.   )
  40. )
  41.