Patch title: Release 93 bulk changes
Abstract:
File: /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"


          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 (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
                    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"
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"


          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 (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
                    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
                [Install the ] ; text distrib ; [ system on ] ; input "" root noeol ; [ partition.] ; eol
                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 !]

          button "Make the new system bootable"
            if allowed:"administrator"
              var Str root := c:env:"partition":"root":"devi
                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 !]

          button "Make the new system bootable"
            if allowed:"administrator"
              var Str root := c:env:"partition":"root":"devi
              title "Make "+root+" partition bootable"
              var Str distrib := c:env:"pliant":"system":"distribution"
              title "Make the system bootable"
              para
              para
                var Str sroot := root
                [The ] ; text distrib ; [ system is installed on ] ; input "" sroot noeol ; [ partition.]
              para
                var Str gbd := "hd0"
                input "GRUB boot drive: " gbd
                var Str gbp := "hd0,0"
                input "GRUB boot partition: " gbp
              para
                var Str lbd := "device:/hda"
                var Str gbd := "hd0"
                input "GRUB boot drive: " gbd
                var Str gbp := "hd0,0"
                input "GRUB boot partition: " gbp
              para
                var Str lbd := "device:/hda"
                if (root parse "device:/sd" any)
                var Str raid := c:env:"partition":"root":"raid_devices"
                if (root parse "device:/sd" any) or (root parse "device:/md" any) and ((raid parse "device:/sd" any) or (raid parse "sd" any))
                  lbd := "device:/sda"
                  lbd := "device:/sda"
                var Str boot := c:env:"hardware":"disk":"boot"
                if boot<>""
                  lbd := boot
                input "Lilo boot drive: " lbd
                var Str geometry := "lba32"
                select "Lilo drive access mode: " geometry
                  option "auto select" ""
                  option "32 bits linear" "lba32"
                  option "24 bits linear" "linear"
                  option "old bios mode" "chs"
              var Str options := c:env:"kernel":"constant":"
              input "Extra Linux kernel options: " options
              table columns 2 border 0
                cell (highlight "warning:")
                cell [If you had a working operating system 
              para
                [You are going to set the disk boot sector s
              [Now install: ]
              button "GRUB" noeol
                var Str grub_options := ""
                input "Lilo boot drive: " lbd
                var Str geometry := "lba32"
                select "Lilo drive access mode: " geometry
                  option "auto select" ""
                  option "32 bits linear" "lba32"
                  option "24 bits linear" "linear"
                  option "old bios mode" "chs"
              var Str options := c:env:"kernel":"constant":"
              input "Extra Linux kernel options: " options
              table columns 2 border 0
                cell (highlight "warning:")
                cell [If you had a working operating system 
              para
                [You are going to set the disk boot sector s
              [Now install: ]
              button "GRUB" noeol
                var Str grub_options := ""
                if this_computer:env:"pliant":"system":"medi
                if true # this_computer:env:"pliant":"system":"medium"="nfs" or this_computer:env:"pliant":"system":"medium"="cdrom"
                  grub_install "file:/mnt/target/" gbd gbp
                  grub_install "file:/mnt/target/" gbd gbp
                  filesystem_mount root "file:/mnt/target/" 
                  filesystem_mount sroot "file:/mnt/target/" "nocheck"
                  update_rights c "file:/mnt/target/"
                  grub_configure c "file:/mnt/target/" gbd g
                  filesystem_dismount "file:/mnt/target/"
                else
                  grub_install "file:/" gbd gbp
                  update_rights c "file:/"
                  grub_configure c "file:/" gbd gbp root opt
                goto_backward
              button "LILO" noeol
                var Str lilo_options := ""
                if geometry<>""
                  lilo_options += " geometry "+string:geomet
                if true # this_computer:env:"pliant":"system
                  update_rights c "file:/mnt/target/"
                  grub_configure c "file:/mnt/target/" gbd g
                  filesystem_dismount "file:/mnt/target/"
                else
                  grub_install "file:/" gbd gbp
                  update_rights c "file:/"
                  grub_configure c "file:/" gbd gbp root opt
                goto_backward
              button "LILO" noeol
                var Str lilo_options := ""
                if geometry<>""
                  lilo_options += " geometry "+string:geomet
                if true # this_computer:env:"pliant":"system
                  filesystem_mount root "file:/mnt/target/" 
                  filesystem_mount sroot "file:/mnt/target/" "nocheck"
                  update_rights c "file:/mnt/target/"
                  var Status status := lilo_install c "file:
                  filesystem_dismount "file:/mnt/target/"
                else
                  update_rights c "file:/"
                  var Status status := lilo_install c "file:
                if status=success
                  goto_backward
                else
                  [Failed to make the system bootable throug
              button "none"
                goto_backward
            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
                  update_rights c "file:/mnt/target/"
                  var Status status := lilo_install c "file:
                  filesystem_dismount "file:/mnt/target/"
                else
                  update_rights c "file:/"
                  var Status status := lilo_install c "file:
                if status=success
                  goto_backward
                else
                  [Failed to make the system bootable throug
              button "none"
                goto_backward
            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