Displaying 8 results from an estimated 8 matches for "get_part_info".
2010 Mar 24
2
[PATCH node][REPOST 1/2] Fix uninstall to detect and cleanup correct partitions
...- eval $(readlink -f /dev/disk/by-label/$grub_dev_label|awk {'
- print "disk=" substr($1,1,length($1)-1);
- print "disk2=" substr($1,1,length($1)-2);
- partN=substr($1,length($1),1); partN--;
- print "partN=" partN;
- }')
+ get_part_info $(readlink -f /dev/disk/by-label/$grub_dev_label disk partN
rc=$?
if [ $rc -ne 0 -o $partN -lt 0 ]; then
log "unable to determine Root partition"
@@ -70,10 +65,6 @@ ovirt_boot_setup() {
return 1
fi
- if [ ! -e "$disk" ]; then
-...
2010 Mar 23
1
[PATCH node][RFC] Fix uninstall to detect and cleanup correct partitions
...- eval $(readlink -f /dev/disk/by-label/$grub_dev_label|awk {'
- print "disk=" substr($1,1,length($1)-1);
- print "disk2=" substr($1,1,length($1)-2);
- partN=substr($1,length($1),1); partN--;
- print "partN=" partN;
- }')
+ get_part_info $(readlink -f /dev/disk/by-label/$grub_dev_label disk partN
rc=$?
if [ $rc -ne 0 -o $partN -lt 0 ]; then
log "unable to determine Root partition"
@@ -70,10 +65,6 @@ ovirt_boot_setup() {
return 1
fi
- if [ ! -e "$disk" ]; then
-...
2010 Mar 23
0
[PATCH node] Fix uninstall to detect and cleanup correct partitions
...- eval $(readlink -f /dev/disk/by-label/$grub_dev_label|awk {'
- print "disk=" substr($1,1,length($1)-1);
- print "disk2=" substr($1,1,length($1)-2);
- partN=substr($1,length($1),1); partN--;
- print "partN=" partN;
- }')
+ get_part_info $(readlink -f /dev/disk/by-label/$grub_dev_label disk partN
rc=$?
if [ $rc -ne 0 -o $partN -lt 0 ]; then
log "unable to determine Root partition"
@@ -70,10 +65,6 @@ ovirt_boot_setup() {
return 1
fi
- if [ ! -e "$disk" ]; then
-...
2010 May 10
1
[PATCH node] RESEND: fix iscsi installation problems
...ev/null ; then
- found_boot=true
+ found_boot=false
grub_dev_label=Root
fi
if $found_boot; then
@@ -62,8 +62,8 @@ ovirt_boot_setup() {
grub_dev_label="RootBackup"
fi
- # check that /boot mounted ok and find partition number for GRUB
- get_part_info $(readlink -f $(findfs LABEL=$grub_dev_label 2>/dev/null)) disk partN
+ # check that /boot mounted ok and find partition number for GRUB, $4 is to allow 0 as a partition number for grub
+ get_part_info $(readlink -f $(findfs LABEL=$grub_dev_label 2>/dev/null)) disk partN y
rc=$?...
2010 Oct 27
0
[PATCH node] add uninstall module
...oot_label_lookup = subprocess.Popen(root_label_lookup_cmd, shell=True, stdout=PIPE, stderr=STDOUT)
+ root_device = root_label_lookup.stdout.read()
+ if root_device is None:
+ log("Can't find Root device")
+ sys.exit(2)
+ root_dev, root_part = get_part_info(root_device)
+
+ root2_label_lookup_cmd = "findfs LABEL=" + root2
+ root2_label_lookup = subprocess.Popen(root2_label_lookup_cmd, shell=True, stdout=PIPE, stderr=STDOUT)
+ root2_device = root2_label_lookup.stdout.read()
+ if root2_device is None:
+...
2010 Apr 09
0
[PATCH node] fix iscsi installation problems
...ev/null ; then
- found_boot=true
+ found_boot=false
grub_dev_label=Root
fi
if $found_boot; then
@@ -56,8 +56,8 @@ ovirt_boot_setup() {
grub_dev_label="RootBackup"
fi
- # check that /boot mounted ok and find partition number for GRUB
- get_part_info $(readlink -f $(findfs LABEL=$grub_dev_label 2>/dev/null)) disk partN
+ # check that /boot mounted ok and find partition number for GRUB, $4 is to allow 0 as a partition number for grub
+ get_part_info $(readlink -f $(findfs LABEL=$grub_dev_label 2>/dev/null)) disk partN y
rc=$?...
2010 Mar 23
1
[PATCH node][RFC] Remove dependencies on /dev/disk/by-label entries
...ot;Boot"
# Grab OVIRT_ISCSI VARIABLES from boot partition for upgrading
# file created only if OVIRT_ISCSI_ENABLED=y
if [ -f /boot/ovirt ]; then
@@ -50,7 +57,7 @@ ovirt_boot_setup() {
fi
# check that /boot mounted ok and find partition number for GRUB
- get_part_info $(readlink -f /dev/disk/by-label/$grub_dev_label disk partN
+ get_part_info $(readlink -f $(findfs LABEL=$grub_dev_label 2>/dev/null) disk partN
rc=$?
if [ $rc -ne 0 -o $partN -lt 0 ]; then
log "unable to determine Root partition"
@@ -67,11 +74,11 @@ ovirt_boot_setu...
2010 Mar 31
1
[PATCH node] Handle space in storage wwid
...at -c '%T' "$dm") ]; then
+ local dm_device="$dm"
rc=0
break
fi
done
- eval $return_var=$dm_device
+ eval $return_var="$dm_device"
return $rc
}
#Function to determine partition and device names
get_part_info() {
- local drive_in=$1
+ local drive_in="$1"
local dev_var=$2
local part_var=$3
local devname_1 devname2 part_number
local rc=0
- eval $(readlink -f $drive_in|awk {'
+ eval $(readlink -f "$drive_in" |awk {'
print "devname_1...