WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

[Xen-users] debian+xen: System fails to mount swap, mydql not starting,

To: xen-users@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-users] debian+xen: System fails to mount swap, mydql not starting, debian kernel install not completing
From: Badiane Ka <badiane_ka@xxxxxxxxx>
Date: Fri, 7 Oct 2005 10:45:49 -0700 (PDT)
Delivery-date: Fri, 07 Oct 2005 17:43:22 +0000
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=YQ1/gJGq5t/xcFUa3Dsga/mqbRJwBTyT7rIGFCeuVbJ11FUR4HTPURpd9yuXKLNCbHyqraciWZPh9SdJXPuFDYPfdIi+zzF+XD09ALpyeMdj9J0PraN6HyZgzuAGY9WvrCoipEwu3tXeMfKDzOazyDByTUVlUMK6e0x4+KdgnQs= ;
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
I am running a xen (2.0.7) kernel on debian testing
(2.6.11) with 3 domU's.  

Problems: MySQL doesn't start
          My domU's have no swap (e.g. 0k) and
mounting them @ boot fails
          my debian kernel give me an error on install
but every thing is available (dom0 booted, and domU's
running).

I was trying to start mysql but it keeps failing with
this message:
Starting MySQL database server: mysqld...failed.
        Please take a look at the syslog.
/usr/bin/mysqladmin: connect to server at 'localhost'
failed
error: 'Can't connect to local MySQL server through
socket '/var/run/mysqld/mysqld.sock' (2)'
Check that mysqld is running and that the socket:
'/var/run/mysqld/mysqld.sock' exists!

Also my domU's come up with swap 0k.
xen-box:~# ls /dev/xen/
evtchn  mail  mail_swap  samba  samba_swap  www 
www_swap
xen-box:~# cat /etc/xen/domains/mail
#  -*- mode: python; -*-
#============================================================================
# Python configuration setup for 'xm create'.
# This script sets the parameters used when a domain
is created using 'xm create'.
# You use a separate script for each domain you want
to create, or
# you can set the parameters for the domain on the xm
command line.
#============================================================================

#----------------------------------------------------------------------------
# Kernel image file.
#kernel = "/boot/vmlinuz-2.6.11.12-xenU"
kernel = "/boot/xen-linux-2.6.11xen-boxu"

# Optional ramdisk.
#ramdisk = "/boot/initrd.gz"

# The domain build function. Default is 'linux'.
#builder='linux'

# Initial memory allocation (in megabytes) for the new
domain.
memory = 126

# A name for your domain. All domains must have
different names.
name = "mail"

# Which CPU to start domain on?
#cpu = -1   # leave to Xen to pick

#----------------------------------------------------------------------------
# Define network interfaces.

# Number of network interfaces. Default is 1.
nics=1

# Optionally define mac and/or bridge for the network
interfaces.
# Random MACs are assigned if not given.
#vif = [ 'mac=aa:00:00:00:00:11, bridge=xen-br0' ]
vif = [ 'mac=aa:00:00:00:00:22' ]

#----------------------------------------------------------------------------
# Define the disk devices you want the domain to have
access to, and
# what you want them accessible as.
# Each disk entry is of the form phy:UNAME,DEV,MODE
# where UNAME is the device, DEV is the device name
the domain will see,
# and MODE is r for read-only, w for read-write.

#disk = [ 'phy:hda1,hda1,w' ]
disk = [ 'phy:xen/mail,sda1,w',
'phy:xen/mail_swap,sda2,w' ]

#----------------------------------------------------------------------------
# Set the kernel command line for the new domain.
# You only need to define the IP parameters and
hostname if the domain's
# IP config doesn't, e.g. in ifcfg-eth0 or via DHCP.
# You can use 'extra' to set the runlevel and custom
environment
# variables used by custom rc scripts (e.g. VMID=,
usr= ).

# Set if you want dhcp to allocate the IP address.
#dhcp="dhcp"
# Set netmask.
#netmask=
# Set default gateway.

#----------------------------------------------------------------------------
# Set the kernel command line for the new domain.
# You only need to define the IP parameters and
hostname if the domain's
# IP config doesn't, e.g. in ifcfg-eth0 or via DHCP.
# You can use 'extra' to set the runlevel and custom
environment
# variables used by custom rc scripts (e.g. VMID=,
usr= ).

# Set if you want dhcp to allocate the IP address.
#dhcp="dhcp"
# Set netmask.
#netmask=
# Set default gateway.
#gateway=
# Set the hostname.
#hostname= "vm%d" % vmid

# Set root device.
root = "/dev/sda1 ro"

# Root device for nfs.
#root = "/dev/nfs"
# The nfs server.
#nfs_server = '169.254.1.0'
# Root directory on the nfs server.
#nfs_root   = '/full/path/to/root/directory'

# Sets runlevel 4.
#extra = "4"
#extra = "2"

#----------------------------------------------------------------------------
# Set according to whether you want the domain
restarted when it exits.
# The default is 'onreboot', which restarts the domain
when it shuts down
# with exit code reboot.
# Other values are 'always', and 'never'.

#restart = 'onreboot'

this is the mail domain and the others are similar
with the mac's, the lvm disks and some generic things
being different.
xen-box:~#  lvmdiskscan
  /dev/ram0  [        4.00 MB]
  /dev/ram   [        4.00 MB]
  /dev/hda1  [      956.97 MB]
  /dev/ram2  [        4.00 MB]
  /dev/hda2  [      957.00 MB]
  /dev/ram3  [        4.00 MB]
  /dev/ram4  [        4.00 MB]
  /dev/ram5  [        4.00 MB]
  /dev/hda5  [       16.78 GB] LVM physical volume
  /dev/ram6  [        4.00 MB]
  /dev/ram7  [        4.00 MB]
  /dev/ram8  [        4.00 MB]
  /dev/ram9  [        4.00 MB]
  /dev/ram10 [        4.00 MB]
  /dev/ram11 [        4.00 MB]
  /dev/ram12 [        4.00 MB]
  /dev/ram13 [        4.00 MB]
  /dev/ram14 [        4.00 MB]
  /dev/ram15 [        4.00 MB]
  1 disk
  17 partitions
  0 LVM physical volume whole disks
  1 LVM physical volume

xen-box:~#  vgdisplay
  --- Volume group ---
  VG Name               xen
  System ID
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  7
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                6
  Open LV               6
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               16.77 GB
  PE Size               4.00 MB
  Total PE              4294
  Alloc PE / Size       3958 / 15.46 GB
  Free  PE / Size       336 / 1.31 GB
  VG UUID              
gR9qoZ-YnoU-4yNQ-DBA2-pEWZ-IjJz-yzjI4u


xen-box:~# lvdisplay
  --- Logical volume ---
  LV Name                /dev/xen/www
  VG Name                xen
  LV UUID               
F8SkRg-m7wt-hoy6-wIyB-SD1H-pocN-N2Plh2
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                2.93 GB
  Current LE             750
  Segments               1
  Allocation             inherit
  Read ahead sectors     0
  Block device           253:0

  --- Logical volume ---
  LV Name                /dev/xen/www_swap
  VG Name                xen
  LV UUID               
QQZoMt-49H5-hp3E-Yyxw-Uqks-fkmo-947BAw
  LV Write Access        read/write
  LV Status              available
  # open                 2
  LV Size                192.00 MB
  Current LE             48
  Segments               1
  Allocation             inherit
  Read ahead sectors     0
  Block device           253:1

  --- Logical volume ---
  LV Name                /dev/xen/mail
  VG Name                xen
  LV UUID               
M7Y4fM-elu2-xVFO-tOl1-isjJ-58Kg-D6A6Hn
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                7.81 GB
  Current LE             2000
  Segments               1
  Allocation             inherit
  Read ahead sectors     0
  Block device           253:2

  --- Logical volume ---
  LV Name                /dev/xen/mail_swap
  VG Name                xen
  LV UUID               
b4ouoT-10jt-6KnA-SG5a-cd51-S6fN-YSRNIF
  LV Write Access        read/write
  LV Status              available
  # open                 2
  LV Size                320.00 MB
  Current LE             80
  Segments               1
  Allocation             inherit
  Read ahead sectors     0
  Block device           253:3

  --- Logical volume ---
  LV Name                /dev/xen/samba
  VG Name                xen
  LV UUID               
zlPB6T-H131-9bys-T3TS-UCVx-Z2BI-Fyi1uT
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                3.91 GB
  Current LE             1000
  Segments               1
  Allocation             inherit
  Read ahead sectors     0
  Block device           253:4

  --- Logical volume ---
  LV Name                /dev/xen/samba_swap
  VG Name                xen
  LV UUID               
LgqcUD-WsGt-pA0U-up0p-X7go-7IAO-NA4WjZ
  LV Write Access        read/write
  LV Status              available
  # open                 2
  LV Size                320.00 MB
  Current LE             80
  Segments               1
  Allocation             inherit
  Read ahead sectors     0
  Block device           253:5


www:~# cat /etc/fstab
# UNCONFIGURED FSTAB FOR BASE SYSTEM
/dev/sda1       /       xfs     defaults        0     
 1
/dev/sda2       none    swap    sw      0       0
proc            /proc   proc    defaults        0     
 0

# UNCONFIGURED FSTAB FOR BASE SYSTEM
/dev/sda1       /       xfs     defaults        0     
 1
/dev/sda2       none    swap    sw      0       0
proc            /proc   proc    defaults        0     
 0
# UNCONFIGURED FSTAB FOR BASE SYSTEM
/dev/sda1       /       xfs     defaults        0     
 1
/dev/sda2       none    swap    sw      0       0
proc            /proc   proc    defaults        0     
 0
Rebooting...Restarting system.
Linux version 2.6.11xen-boxu (root@xen-box) (gcc
version 3.3.6 (Debian 1:3.3.6-10)) #1 Tue Oct 4
14:27:07 EDT 2005
BIOS-provided physical RAM map:
 Xen: 0000000000000000 - 0000000007e00000 (usable)
126MB LOWMEM available.
DMI not present.
IRQ lockup detection disabled
Allocating PCI resources starting at 07e00000 (gap:
07e00000:f8200000)
Built 1 zonelists
Kernel command line:  root=/dev/sda1 ro
Initializing CPU#0
PID hash table entries: 512 (order: 9, 8192 bytes)
Xen reported: 1395.775 MHz processor.
Using tsc for high-res timesource
Dentry cache hash table entries: 16384 (order: 4,
65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768
bytes)
vmalloc area: c8800000-fbff9000, maxmem 34000000
Memory: 124556k/129024k available (2207k kernel code,
4320k reserved, 459k data, 116k init, 0k highmem)
Checking if this processor honours the WP bit even in
supervisor mode... Ok.
Mount-cache hash table entries: 512 (order: 0, 4096
bytes)
CPU: L1 I cache: 16K, L1 D cache: 16K
CPU: L2 cache: 256K
CPU: Intel(R) Celeron(TM) CPU                1400MHz
stepping 01
Enabling fast FPU save and restore... done.
Enabling unmasked SIMD FPU exception support... done.
Checking 'hlt' instruction... disabled
NET: Registered protocol family 16
xen_mem: Initialising balloon driver.
SCSI subsystem initialized
SGI XFS with ACLs, security attributes, realtime, no
debug enabled
SGI XFS Quota Management subsystem
Initializing Cryptographic API
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered
RAMDISK driver initialized: 16 RAM disks of 4096K size
1024 blocksize
loop: loaded (max 8 devices)
nbd: registered device at major 43
Xen virtual console successfully installed as tty
Event-channel device installed.
xen_blk: Initialising virtual block device driver
xen_net: Initialising virtual ethernet driver.
register_blkdev: cannot get major 8 for sd
NET: Registered protocol family 2
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP established hash table entries: 4096 (order: 3,
32768 bytes)
TCP bind hash table entries: 4096 (order: 2, 16384
bytes)
TCP: Hash tables configured (established 4096 bind
4096)
NET: Registered protocol family 1
NET: Registered protocol family 17
XFS mounting filesystem sda1
VFS: Mounted root (xfs filesystem) readonly.
Freeing unused kernel memory: 116k freed
Failed to mount /selinux/: No such file or directory
INIT: version 2.86 booting
Activating swap.
 failed!
Checking root file system...fsck: fsck.xfs: not found
fsck: Error 2 while executing fsck.xfs for
/dev/shm/root
.
hwclock is unable to get I/O port access:  the iopl(3)
call failed.
System time was Fri Oct  7 14:42:33 UTC 2005.
Setting the System Clock using the Hardware Clock as
reference...
hwclock is unable to get I/O port access:  the iopl(3)
call failed.
System Clock set. System local time is now Fri Oct  7
14:42:33 UTC 2005.
Cleaning up ifupdown...done.
Checking all file systems...fsck: cannot check
/dev/sda1: fsck.xfs not found
.
Setting kernel variables ...
... done.
Mounting local filesystems... failed!
Cleaning /tmp....
Cleaning /var/run ....
Cleaning /var/lock ....
Running 0dns-down to make sure resolv.conf is
ok...done.
Setting up networking...done.
Setting up IP spoofing protection: rp_filter.
Configuring network
interfaces.../etc/network/if-up.d/postfix: line 18:
postconf: command not found
cp: `/etc/resolv.conf' and `/etc/resolv.conf' are the
same file
run-parts: /etc/network/if-up.d/postfix exited with
return code 1
/etc/network/if-up.d/postfix: line 18: postconf:
command not found
cp: `/etc/resolv.conf' and `/etc/resolv.conf' are the
same file
run-parts: /etc/network/if-up.d/postfix exited with
return code 1
done.

Setting the System Clock using the Hardware Clock as
reference...
hwclock is unable to get I/O port access:  the iopl(3)
call failed.
System Clock set. Local time: Fri Oct  7 10:42:35 EDT
2005

Initializing random number generator....
Recovering nvi editor sessions... done.
INIT: Entering runlevel: 2
Starting system log daemon: syslogd.
Starting kernel log daemon: klogd.
Starting Cyrus IMAPd: cyrmaster.
process `cyrmaster' is using obsolete setsockopt
SO_BSDCOMPAT
Starting MTA: exim4.
Starting internet superserver: inetd.
Starting printer spooler: lpd .
Starting OpenBSD Secure Shell server: sshd.
Starting deferred execution scheduler: atd.
Starting periodic command scheduler: cron.

Debian GNU/Linux testing/unstable mail console

mail login:

Linux version 2.6.11xen-boxu (root@xen-box) (gcc
version 3.3.6 (Debian 1:3.3.6-10)) #1 Tue Oct 4
14:27:07 EDT 2005
BIOS-provided physical RAM map:
 Xen: 0000000000000000 - 0000000007e00000 (usable)
126MB LOWMEM available.
DMI not present.
IRQ lockup detection disabled
Allocating PCI resources starting at 07e00000 (gap:
07e00000:f8200000)
Built 1 zonelists
Kernel command line:  root=/dev/sda1 ro
Initializing CPU#0
PID hash table entries: 512 (order: 9, 8192 bytes)
Xen reported: 1395.775 MHz processor.
Using tsc for high-res timesource
Dentry cache hash table entries: 16384 (order: 4,
65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768
bytes)
vmalloc area: c8800000-fbff9000, maxmem 34000000
Memory: 124540k/129024k available (2207k kernel code,
4328k reserved, 459k data, 116k init, 0k highmem)
Checking if this processor honours the WP bit even in
supervisor mode... Ok.
Mount-cache hash table entries: 512 (order: 0, 4096
bytes)
CPU: L1 I cache: 16K, L1 D cache: 16K
CPU: L2 cache: 256K
CPU: Intel(R) Celeron(TM) CPU                1400MHz
stepping 01
Enabling fast FPU save and restore... done.
Enabling unmasked SIMD FPU exception support... done.
Checking 'hlt' instruction... disabled
NET: Registered protocol family 16
xen_mem: Initialising balloon driver.
SCSI subsystem initialized
SGI XFS with ACLs, security attributes, realtime, no
debug enabled
SGI XFS Quota Management subsystem
Initializing Cryptographic API
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered
RAMDISK driver initialized: 16 RAM disks of 4096K size
1024 blocksize
loop: loaded (max 8 devices)
nbd: registered device at major 43
Xen virtual console successfully installed as tty
Event-channel device installed.
xen_blk: Initialising virtual block device driver
xen_net: Initialising virtual ethernet driver.
register_blkdev: cannot get major 8 for sd
NET: Registered protocol family 2
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP established hash table entries: 4096 (order: 3,
32768 bytes)
TCP bind hash table entries: 4096 (order: 2, 16384
bytes)
TCP: Hash tables configured (established 4096 bind
4096)
NET: Registered protocol family 1
NET: Registered protocol family 17
XFS mounting filesystem sda1
VFS: Mounted root (xfs filesystem) readonly.
Freeing unused kernel memory: 116k freed
Failed to mount /selinux/: No such file or directory
INIT: version 2.86 booting
Activating swap.
 failed!
Checking root file system...WARNING: bad format on
line 5 of /etc/fstab
fsck: fsck.xfs: not found
fsck: Error 2 while executing fsck.xfs for
/dev/shm/root
.
hwclock is unable to get I/O port access:  the iopl(3)
call failed.
System time was Fri Oct  7 14:38:51 UTC 2005.
Setting the System Clock using the Hardware Clock as
reference...
hwclock is unable to get I/O port access:  the iopl(3)
call failed.
System Clock set. System local time is now Fri Oct  7
14:38:51 UTC 2005.
Cleaning up ifupdown...done.
Checking all file systems...WARNING: bad format on
line 5 of /etc/fstab
fsck: cannot check /dev/sda1: fsck.xfs not found
.
Setting kernel variables ...
... done.
Mounting local filesystems... failed!
Cleaning /tmp....
Cleaning /var/run ....
Cleaning /var/lock ....
Running 0dns-down to make sure resolv.conf is
ok...done.
Setting up networking...done.
Setting up IP spoofing protection: rp_filter.
Configuring network interfaces...done.

Setting the System Clock using the Hardware Clock as
reference...
hwclock is unable to get I/O port access:  the iopl(3)
call failed.
System Clock set. Local time: Fri Oct  7 10:38:53 EDT
2005

Initializing random number generator....
Recovering nvi editor sessions... done.
INIT: Entering runlevel: 2
Starting system log daemon: syslogd.
Starting kernel log daemon: klogd.
Starting MTA: exim4.
Starting internet superserver: inetd.
Starting printer spooler: lpd .
Starting Samba daemons: nmbd smbd.
Starting OpenBSD Secure Shell server: sshd.
Starting deferred execution scheduler: atd.
Starting periodic command scheduler: cron.

Debian GNU/Linux testing/unstable samba console

samba login:



xen-box:~# apt-get -f install
Reading Package Lists... Done
Building Dependency Tree... Done
0 upgraded, 0 newly installed, 0 to remove and 117 not
upgraded.
2 not fully installed or removed.
Need to get 0B of archives.
After unpacking 0B of additional disk space will be
used.
Setting up kernel-xen0-2.6.11xen-box0 (1) ...
sed: -e expression #1, char 9: unknown option to `s'
dpkg: error processing kernel-xen0-2.6.11xen-box0
(--configure):
 subprocess post-installation script returned error
exit status 1
Setting up kernel-xen0-2.6.11xen-boxu (1) ...
sed: -e expression #1, char 9: unknown option to `s'
dpkg: error processing kernel-xen0-2.6.11xen-boxu
(--configure):
 subprocess post-installation script returned error
exit status 1
Errors were encountered while processing:
 kernel-xen0-2.6.11xen-box0
 kernel-xen0-2.6.11xen-boxu
E: Sub-process /usr/bin/dpkg returned an error code
(1)


The kernels are installed and I use them but the
installation mentions an error in this file 


xen-box:~# cat
/var/lib/dpkg/info/kernel-xen0-2.6.11xen-box0.postinst
#! /bin/sh
#                         -*- Mode: Sh -*-
# postinst ---
# Author           : Manoj Srivastava (
srivasta@xxxxxxxxxxxxxxxxxxxxxxxxxx )
# Created On       : Fri Nov 14 11:25:07 2003
# Created On Node  : glaurung.green-gryphon.com
# Last Modified By : Manoj Srivastava
# Last Modified On : Wed Aug 31 09:27:17 2005
# Last Machine Used:
glaurung.internal.golden-gryphon.com
# Update Count     : 42
# Status           : Unknown, Use with caution!
# HISTORY          :
# Description      :
#
# arch-tag: 5401e9ef-39cc-4aee-96a4-61dfb8f32cf7
#
# This program is free software; you can redistribute
it and/or modify
# it under the terms of the GNU General Public License
as published by
# the Free Software Foundation; either version 2 of
the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will
be useful,
# but WITHOUT ANY WARRANTY; without even the implied
warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General
Public License
# along with this program; if not, write to the Free
Software
# Foundation, Inc., 59 Temple Place, Suite 330,
Boston, MA  02111-1307  USA
#
#

# Abort if any command returns an error value
set -e

# Predefined values:
version="2.6.11xen-box0";
link_in_boot="";   # Should be empty, mostly
no_symlink="";   # Should be empty, mostly
reverse_symlink="";   # Should be empty, mostly
kimage="vmlinuz";   # Should be empty, mostly
loader="";   # lilo, silo, quik, palo, vmelilo,
nettrom, arcboot or delo
image_dir="/boot";        # where the image is located
initrd="";        # initrd kernel
mkimage="";        # command to generate the initrd
image
official_image="";      # only true for official
images
subarch="A";          # should be xen0 or xenu
ramdisk='/usr/sbin/mkinitrd'    # Tool to create
initial ram fs.
realimageloc="/$image_dir/";
realimageloc=$(echo $realimageloc | sed -e 's|^/*|/|o'
-e 's|/+|/|o')

package_name="kernel-$subarch-$version";

if [ -z "$package_name" ]; then
    print >&2 "Internal Error. Please report a bug."
    exit 1;
fi

# This script is called as the last step of the
installation of the
# package.  All the package's files are in place, dpkg
has already done
# its automatic conffile handling, and all the
packages we depend of
# are already fully installed and configured.
# summary of how this script can be called:
#        * <postinst> `configure'
<most-recently-configured-version>
#        * <old-postinst> `abort-upgrade' <new
version>
#        * <conflictor's-postinst> `abort-remove'
`in-favour' <package>
#          <new-version>
#        * <deconfigured's-postinst>
`abort-deconfigure' `in-favour'
#          <failed-install-package> <version>
`removing'
#          <conflicting-package> <version>
# for details, see
http://www.debian.org/doc/debian-policy/ or
# the debian-policy package
#
# quoting from the policy:
#     Any necessary prompting should almost always be
confined to the
#     post-installation script, and should be
protected with a conditional
#     so that unnecessary prompting doesn't happen if
a package's
#     installation fails and the `postinst' is called
with `abort-upgrade',
#     `abort-remove' or `abort-deconfigure'.

# The following idempotent stuff doesn't generally
need protecting
# against being run in the abort-* cases.

# Install info files into the dir file
##: install-info --quiet --section "section pattern"
"Section Title" \
##:              --description="Name of the document"
/usr/info/${package_name}.info

# Create stub directories under /usr/local
##: if test ! -d /usr/local/lib/${package_name}; then
##:   if test ! -d /usr/local/lib; then
##:     if mkdir /usr/local/lib; then
##:       chown root.staff /usr/local/lib || true
##:       chmod 2775 /usr/local/lib || true
##:     fi
##:   fi
##:   if mkdir /usr/local/lib/${package_name}; then
##:     chown root.staff
/usr/local/lib/${package_name} || true
##:     chmod 2775 /usr/local/lib/${package_name} ||
true
##:   fi
##: fi

# Ensure the menu system is updated
#[ ! -x /usr/bin/update-menus ] ||
/usr/bin/update-menus


## Deprecated
##if test -x /usr/sbin/wm-menu-config; then
wm-menu-config fvwm on; fi


# Arrange for a daemon to be started at system boot
time
##: update-rc.d ${package_name} default >/dev/null



# This package uses debconf to ask a question, so
source the debconf
# confmodule as early as possible. However, it does
not depend on debconf,
# so debconf may not be installed.
#if [ -e /usr/share/debconf/confmodule ]; then
#        . /usr/share/debconf/confmodule
#        db_capb
#fi


case "$1" in
    configure)

        # Configure this package.  If the package must
prompt the user for
        # information, do it here.
        # Install emacs lisp files
        ##:if [ -x 
/usr/lib/emacsen-common/emacs-package-install ]; then
        ##:   
/usr/lib/emacsen-common/emacs-package-install
$package_name
        ##:fi


        # Activate menu-methods script
        # chmod a+x /etc/menu-methods/${package_name}

        # Update ld.so cache
        ##: ldconfig

        # Make our version of a program available
        #update-alternatives     \

        #       --install /usr/bin/linux linux
/usr/bin/linux-$version 100     \
        #       --slave  
/usr/share/man/man1/linux.1.gz linux.1.gz     \
        #                
/usr/share/man/man1/linux-${version}.1.gz

        # Tell ucf that the file in /usr/share/foo is
the latest
        # maintainer version, and let it handle how to
manage the real
        # confuguration file in /etc. This is how a
static configuration
        # file can be handled:
        ##:if which ucf >/dev/null 2>&1; then
        ##:  ucf
/usr/share/${package_name}/configuration
/etc/${package_name}.conf
        ##:fi

        ### We could also do this on the fly. The
following is from Tore
        ### Anderson:

        #. /usr/share/debconf/confmodule

        ### find out what the user answered.
        #  db_get foo/run_on_boot
        #  run_on_boot=$RET
        #  db_stop

        ### safely create a temporary file to generate
our suggested
        ### configuration file.
        #    tempfile=`tempfile`
        #    cat << _eof > $tempfile
        ### Configuration file for Foo.

        ### this was answered by you, the user in a
debconf dialogue
        #  RUNONBOOT=$run_on_boot

        ### this was not, as it has a sane default
value.
        #  COLOUROFSKY=blue

        #_eof

        ### Note that some versions of debconf do not
release stdin, so
        ### the following invocation of ucf may not
work, since the stdin
        ### is never coneected to ucfr.

        ### now, invoke ucf, which will take care of
the rest, and ask
        ### the user if he wants to update his file,
if it is modified.
        #ucf $tempfile /etc/foo.conf

        ### done! now we'll just clear up our cruft.
        #rm -f $tempfile

        if [ -n "$initrd" ]; then
            echo "Please manually create an initrd
image"
        fi



        # There are three sub-cases:
        if test "${2+set}" != set; then
            # We're being installed by an ancient dpkg
which doesn't remember
            # which version was most recently
configured, or even whether
            # there is a most recently configured
version.
            : echo nop
        elif test -z "$2" -o "$2" = "<unknown>"; then
            # The package has not ever been configured
on this system, or was
            # purged since it was last configured.
            : echo nop

        else
            # Version $2 is the most recently
configured version of this
            # package.
            : echo nop
        fi
        ;;
    abort-upgrade)
        # Back out of an attempt to upgrade this
package FROM THIS VERSION
        # to version $2.  Undo the effects of "prerm
upgrade $2".
        ##:

        ;;
    abort-remove)
        if test "$2" != in-favour; then
            echo "$0: undocumented call to \`postinst
$*'" 1>&2
            exit 0
        fi
        # Back out of an attempt to remove this
package, which was due to
        # a conflict with package $3 (version $4). 
Undo the effects of
        # "prerm remove in-favour $3 $4".
        ##:

        ;;
    abort-deconfigure)
        if test "$2" != in-favour -o "$5" != removing;
then
            echo "$0: undocumented call to \`postinst
$*'" 1>&2
            exit 0
        fi
        # Back out of an attempt to deconfigure this
package, which was
        # due to package $6 (version $7) which we
depend on being removed
        # to make way for package $3 (version $4). 
Undo the effects of
        # "prerm deconfigure in-favour $3 $4 removing
$6 $7".
        ##:

        ;;
    *) echo "$0: didn't understand being called with
\`$1'" 1>&2
        exit 0;;
esac

# Install doc base documentation
##:if which install-docs >/dev/null 2>&1; then
##:  if [ -e /usr/share/doc-base/${package_name} ];
then
##:    install-docs -i
/usr/share/doc-base/${package_name}
##:  fi
##:fi

exit 0


Any and all hints will be greatly appreciated.





                
__________________________________ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users

<Prev in Thread] Current Thread [Next in Thread>