Patch title: Release 85 bulk changes
Abstract:
File: /pliant/fullpliant/computer.page
Key:
    Removed line
    Added line
   
module "/pliant/language/context.pli"
module "rules.pli"
module "install.pli"
module "embedded/install.pli"
module "embedded/compile.pli"
module "computer.pli"
module "debian.pli"


table columns 2
  cell header
    [Computer name]
  cell
    void
  each c computer
    cell
      fixed (text keyof:c)
    cell
      page button "Edit"
module "/pliant/language/context.pli"
module "rules.pli"
module "install.pli"
module "embedded/install.pli"
module "embedded/compile.pli"
module "computer.pli"
module "debian.pli"


table columns 2
  cell header
    [Computer name]
  cell
    void
  each c computer
    cell
      fixed (text keyof:c)
    cell
      page button "Edit"
        if not allowed:"administrator"
          read_only_mode := true
        read_only not allowed:"administrator"
        title "Computer '"+keyof:c+"'"


            page button "Engrave a recovery CD" 
              if c:env:"partition":"root":"device"=""
                [You cannot engrave the CD without a root pa
              eif allowed:"administrator"
                title "Engrave a recovery CD"
                table columns 4 border 0
                  cell
                    highlight "warning:"
                  cell
                    [Selecting yes will eraze your] ; eol
                  cell
                    fixed [file:/usr/src/linux/] ; eol
                    fixed [file:/usr/src/pcmcia-cs/] ; eol
                    fixed [file:/mnt/target/] ; eol
                  cell
                    [directories.]
                input "Name of the computers you want to rec
                select "Kind of CD: " (var Str rw)
                  option "Write only" ""
                  option "Read write" " rw"
                  option "store image to embedded:/tmp/recov
                [Do you really want to engrave the CD ? ]
                page button "yes" noeol
                  part engrave_cd
                    var Str all := target_names
                    while all<>""
                      if not (all parse any:(var Str first) 
                        first := all ; remain := ""
                      if (file_query "file:/fullpliant/archi
                        if not (exists computer:first)
                          text "There is no '"+first+"' in t
                        else
                          text "The target system archive fo
                        leave engrave_cd
                      all := remain
                    var ExtendedStatus status := install_tre
                    if status=success
                      var Str all := target_names
                      while all<>""
                        if not (all parse any:(var Str first
                          first := all ; remain := ""
                        file_copy "file:/fullpliant/archive/
                        var Str embedded := computer:first:e
                        if embedded<>""
                          file_copy "file:/fullpliant/archiv
                        all := remain
                      console "Building CD the embedded boot
                      install_floppy c "file:/mnt/target/boo
                      if rw="store"
                        console "storing CD image" eol
        title "Computer '"+keyof:c+"'"


            page button "Engrave a recovery CD" 
              if c:env:"partition":"root":"device"=""
                [You cannot engrave the CD without a root pa
              eif allowed:"administrator"
                title "Engrave a recovery CD"
                table columns 4 border 0
                  cell
                    highlight "warning:"
                  cell
                    [Selecting yes will eraze your] ; eol
                  cell
                    fixed [file:/usr/src/linux/] ; eol
                    fixed [file:/usr/src/pcmcia-cs/] ; eol
                    fixed [file:/mnt/target/] ; eol
                  cell
                    [directories.]
                input "Name of the computers you want to rec
                select "Kind of CD: " (var Str rw)
                  option "Write only" ""
                  option "Read write" " rw"
                  option "store image to embedded:/tmp/recov
                [Do you really want to engrave the CD ? ]
                page button "yes" noeol
                  part engrave_cd
                    var Str all := target_names
                    while all<>""
                      if not (all parse any:(var Str first) 
                        first := all ; remain := ""
                      if (file_query "file:/fullpliant/archi
                        if not (exists computer:first)
                          text "There is no '"+first+"' in t
                        else
                          text "The target system archive fo
                        leave engrave_cd
                      all := remain
                    var ExtendedStatus status := install_tre
                    if status=success
                      var Str all := target_names
                      while all<>""
                        if not (all parse any:(var Str first
                          first := all ; remain := ""
                        file_copy "file:/fullpliant/archive/
                        var Str embedded := computer:first:e
                        if embedded<>""
                          file_copy "file:/fullpliant/archiv
                        all := remain
                      console "Building CD the embedded boot
                      install_floppy c "file:/mnt/target/boo
                      if rw="store"
                        console "storing CD image" eol
                        status := cdrom_image (var List:File
                        status := cdrom_image (var List:FileInfo empty_list) "path [dq]file:/mnt/target/[dq] boot [dq]boot/floppy[dq]" "embedded:/tmp/recover.cd"
                      else
                        console "Engraving the CD" eol
                      else
                        console "Engraving the CD" eol
                        status := cdrom_engrave "file:/mnt/t
                        status := cdrom_engrave "file:/mnt/target/" "boot [dq]boot/floppy[dq]"+rw+" indirect"
                      file_tree_delete "file:/mnt/target/"
                      console "done." eol
                      if status=success
                        goto_backward
                      else
                        text "failed: "+status:message
                    else
                      console "failed." eol
                      [Failed to engrave the bootable CD for
                      [Error message is: ] ; eol
                      fixed (text status:message)
                button "no"
                  goto_backward
              else
                [Only the administrator can do that !]


          enumerate_partitions c (var Dictionary partitions)
          each d disks type Str
            var Str disk := d
            button "Partition "+disk+" disk" noeol
              if allowed:"administrator"
                title "Partitioning "+disk
                table columns 1 border 0
                      file_tree_delete "file:/mnt/target/"
                      console "done." eol
                      if status=success
                        goto_backward
                      else
                        text "failed: "+status:message
                    else
                      console "failed." eol
                      [Failed to engrave the bootable CD for
                      [Error message is: ] ; eol
                      fixed (text status:message)
                button "no"
                  goto_backward
              else
                [Only the administrator can do that !]


          enumerate_partitions c (var Dictionary partitions)
          each d disks type Str
            var Str disk := d
            button "Partition "+disk+" disk" noeol
              if allowed:"administrator"
                title "Partitioning "+disk
                table columns 1 border 0
                  cell color lsh 80 50 0
                  cell color (color hsl 0 50 75)
                    [This will eraze all your datas on disk]
                [Are you sure you want to do that ? ]
                button "yes" noeol
                  install_partition c disk
                  goto_backward
                button "no"
                  goto_backward
              else
                [Only the administrator can do that !]
          eol
          each p partitions type DiskPartition
            var Str partition := p name
            var Str device := p device
            var Str devices := p raid_devices
            if partition<>"" and p:filesystem<>"raid"
              button "Format "+partition+" partition" noeol
                if allowed:"administrator"
                  title "Formating "+partition+" partition"
                  table columns 1 border 0
                    [This will eraze all your datas on disk]
                [Are you sure you want to do that ? ]
                button "yes" noeol
                  install_partition c disk
                  goto_backward
                button "no"
                  goto_backward
              else
                [Only the administrator can do that !]
          eol
          each p partitions type DiskPartition
            var Str partition := p name
            var Str device := p device
            var Str devices := p raid_devices
            if partition<>"" and p:filesystem<>"raid"
              button "Format "+partition+" partition" noeol
                if allowed:"administrator"
                  title "Formating "+partition+" partition"
                  table columns 1 border 0
                    cell color lsh 80 50 0
                    cell color (color hsl 0 50 75)
                      [This will eraze all your datas on the
                      if devices<>""
                        eol ; [and also on the] ; fixed (tex
                  [Are you sure you want to do that ? ]
                  button "yes" noeol
                    install_format c partition
                    goto_backward
                  button "no"
                    goto_backward
                else
                  [Only the administrator can do that !]
          eol
          button "Install the system"
            if allowed:"administrator"
              var Str root := c:env:"partition":"root":"devi
              var Str distrib := c:env:"pliant":"system":"di
              if (file_query "file:/fullpliant/archive/"+key
                title "Installing the system"
                para
                  [You are going to copy the ] ; text distri
                var Str embedded := c:env:"pliant":"system":
                if embedded<>""
                  select "Do you want to install the embedde
                    option "yes" embedded
                    option "no" ""                  
                [Do you really want to do it now ? ]
                button "yes" noeol
                  if (filesystem_mount root "file:/mnt/targe
                    var Status status := success
                    if embedded<>""
                      if (file_extract "file:/fullpliant/arc
                        status := failure
                    if (file_extract "file:/fullpliant/archi
                      status := failure
                    filesystem_dismount "file:/mnt/target/"
                    if status=success
                      goto_backward
                    else
                      [Failed to extract some files.]
                  else
                    text "Failed to mount "+root+" partition
                button "no"
                  goto_backward
              else
                [The image of the system is not available in
            else
              [Only the administrator can do that !]


if allowed:"administrator"
  input "Computer name: " (var Str sid) noeol
  var Str cid := ""
  button "Create the new computer" noeol
    if not (exists computer:sid)
      computer create sid
      if cid<>""
        data_copy computer:cid computer:sid
    reload_page
  button "Delete the computer"
    computer delete sid
    reload_page
  input "... as a copy of: " cid
                      [This will eraze all your datas on the
                      if devices<>""
                        eol ; [and also on the] ; fixed (tex
                  [Are you sure you want to do that ? ]
                  button "yes" noeol
                    install_format c partition
                    goto_backward
                  button "no"
                    goto_backward
                else
                  [Only the administrator can do that !]
          eol
          button "Install the system"
            if allowed:"administrator"
              var Str root := c:env:"partition":"root":"devi
              var Str distrib := c:env:"pliant":"system":"di
              if (file_query "file:/fullpliant/archive/"+key
                title "Installing the system"
                para
                  [You are going to copy the ] ; text distri
                var Str embedded := c:env:"pliant":"system":
                if embedded<>""
                  select "Do you want to install the embedde
                    option "yes" embedded
                    option "no" ""                  
                [Do you really want to do it now ? ]
                button "yes" noeol
                  if (filesystem_mount root "file:/mnt/targe
                    var Status status := success
                    if embedded<>""
                      if (file_extract "file:/fullpliant/arc
                        status := failure
                    if (file_extract "file:/fullpliant/archi
                      status := failure
                    filesystem_dismount "file:/mnt/target/"
                    if status=success
                      goto_backward
                    else
                      [Failed to extract some files.]
                  else
                    text "Failed to mount "+root+" partition
                button "no"
                  goto_backward
              else
                [The image of the system is not available in
            else
              [Only the administrator can do that !]


if allowed:"administrator"
  input "Computer name: " (var Str sid) noeol
  var Str cid := ""
  button "Create the new computer" noeol
    if not (exists computer:sid)
      computer create sid
      if cid<>""
        data_copy computer:cid computer:sid
    reload_page
  button "Delete the computer"
    computer delete sid
    reload_page
  input "... as a copy of: " cid