Changeset 345


Ignore:
Timestamp:
Mar 3, 2010, 6:52:39 PM (11 years ago)
Author:
zecrazytux
Message:

Fixed a shell warning at first 'rorette' creation
Take the first available LVM volume group instead of harcoding one

Location:
ror-farm
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • ror-farm/ror-farm-add

    r338 r345  
    3030#
    3131domain=ror.bearstech.com
    32 vgname=`vgdisplay -Ac 2>/dev/null | head -n1 | sed 's/^ *\([^:]*\).*/\1/'`
     32vgname=$(vgs --noheadings | awk '{ print $1 }' | head -1)
    3333slices=1
    3434template=template
     
    151151cd $VSERVER_CONF
    152152for c in */context; do
    153   if [ "$id" = `cat $c` ]; then
     153  if [ -f "$c" -a "$id" = `cat $c` ]; then
    154154    error "vserver-id already used by '${c/\/context/}'"
    155155  fi
  • ror-farm/ror-farm-del

    r68 r345  
    5959name="$1"; shift
    6060
     61vgname=$(vgs --noheadings | awk '{ print $1 }' | head -1)
     62
    6163if [ -z "$name" ]; then
    6264  help; exit 1
     
    7779umount /var/lib/vservers/$name/home
    7880umount /var/lib/vservers/$name
    79 lvremove -f /dev/vg-vservers/$name
     81lvremove -f /dev/$vgname/$name
    8082
    8183cd /etc
Note: See TracChangeset for help on using the changeset viewer.