summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog24
-rwxr-xr-xscripts/install-system18
-rwxr-xr-xscripts/install/install-get-partition16
-rwxr-xr-xscripts/vyatta-bridge.pl4
-rw-r--r--templates/interfaces/bonding/node.tag/description/node.def4
-rw-r--r--templates/interfaces/bonding/node.tag/vif/node.tag/description/node.def4
-rw-r--r--templates/interfaces/bonding/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/interface/description/node.def4
-rw-r--r--templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.tag/interface/description/node.def4
-rw-r--r--templates/interfaces/bridge/node.tag/description/node.def4
-rw-r--r--templates/interfaces/ethernet/node.tag/description/node.def4
-rw-r--r--templates/interfaces/ethernet/node.tag/vif/node.tag/description/node.def4
-rw-r--r--templates/interfaces/ethernet/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/interface/description/node.def4
-rw-r--r--templates/interfaces/ethernet/node.tag/vrrp/vrrp-group/node.tag/interface/description/node.def4
-rw-r--r--templates/interfaces/loopback/node.tag/description/node.def4
-rw-r--r--templates/interfaces/pseudo-ethernet/node.tag/description/node.def4
-rw-r--r--templates/interfaces/pseudo-ethernet/node.tag/vif/node.tag/description/node.def4
-rw-r--r--templates/interfaces/tunnel/node.tag/description/node.def4
17 files changed, 111 insertions, 3 deletions
diff --git a/debian/changelog b/debian/changelog
index b434eb6c..fc71fc38 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,27 @@
+vyatta-cfg-system (0.19.159) unstable; urgency=low
+
+ * Fix missing error (missing lecho) in install-system
+
+ -- Stephen Hemminger <shemminger@vyatta.com> Tue, 24 Jan 2012 16:51:45 -0800
+
+vyatta-cfg-system (0.19.158) unstable; urgency=low
+
+ * Make disk label if necessary
+
+ -- Stephen Hemminger <shemminger@vyatta.com> Fri, 20 Jan 2012 15:37:31 -0800
+
+vyatta-cfg-system (0.19.157) unstable; urgency=low
+
+ * Enforce length restriction on interface description
+
+ -- Stephen Hemminger <shemminger@vyatta.com> Thu, 19 Jan 2012 19:05:36 -0800
+
+vyatta-cfg-system (0.19.156) unstable; urgency=low
+
+ * Fix check for pseudo-ethernet overlap
+
+ -- Stephen Hemminger <shemminger@vyatta.com> Mon, 16 Jan 2012 10:26:21 -0800
+
vyatta-cfg-system (0.19.155) unstable; urgency=low
* Check for conflict between pseudo-ethernet and bonding,bridging
diff --git a/scripts/install-system b/scripts/install-system
index 536233d7..fbff5e1f 100755
--- a/scripts/install-system
+++ b/scripts/install-system
@@ -647,7 +647,7 @@ save_image_config() {
if [ -n "$output" ]; then
echo -e "Warning: error in copying the old config partition.\nSee $INSTALL_LOG for more details."
- lecho "Warning: error in copying the old config partition.\ncp -pR /mnt/tmp/* /mnt/config\n$output\n"
+ echo "Warning: error in copying the old config partition.\ncp -pR /mnt/tmp/* /mnt/config\n$output\n"
fi
rename_old_config
}
@@ -840,6 +840,22 @@ create_partitions() {
exit 1
fi
+ # Make sure you can print disk info using parted
+ parted --script /dev/$ldrive p >/dev/null 2>&1
+
+ # If unable to read disk, it's likely it needs a disklabel
+ if [ "$?" != "0" ]; then
+ echo "Creating a new disklabel on $ldrive"
+ echo "parted /dev/$ldrive mklabel msdos"
+ output=$(parted -s /dev/$ldrive mklabel msdos)
+
+ parted --script /dev/$ldrive p >/dev/null 2>&1
+ if [ "$?" != "0" ]; then
+ echo "Unable to read disk label. Exiting."
+ exit 1
+ fi
+ fi
+
echo "Creating root partition on /dev/$ldrive" >> $INSTALL_LOG
# make the root partition
diff --git a/scripts/install/install-get-partition b/scripts/install/install-get-partition
index 86197708..594fa929 100755
--- a/scripts/install/install-get-partition
+++ b/scripts/install/install-get-partition
@@ -682,6 +682,22 @@ create_partitions() {
exit 1
fi
+ # Make sure you can print disk info using parted
+ parted --script /dev/$ldrive p >/dev/null 2>&1
+
+ # If unable to read disk, it's likely it needs a disklabel
+ if [ "$?" != "0" ]; then
+ lecho "Creating a new disklabel on $ldrive"
+ lecho "parted /dev/$ldrive mklabel msdos"
+ output=$(parted -s /dev/$ldrive mklabel msdos)
+
+ parted --script /dev/$ldrive p >/dev/null 2>&1
+ if [ "$?" != "0" ]; then
+ echo "Unable to read disk label. Exiting."
+ exit 1
+ fi
+ fi
+
lecho "Creating root partition on /dev/$ldrive"
# make the root partition
diff --git a/scripts/vyatta-bridge.pl b/scripts/vyatta-bridge.pl
index 68d3e107..b1a3afaa 100755
--- a/scripts/vyatta-bridge.pl
+++ b/scripts/vyatta-bridge.pl
@@ -72,8 +72,8 @@ if ( $action eq 'SET' ) {
foreach my $peth ($cfg->listNodes()) {
my $link = $cfg->returnValue("$peth link");
- die "Error: can not add interface $slave to bridge already used by pseudo-ethernet $peth\n"
- if ($link eq $slave);
+ die "Error: can not add interface $ifname to bridge already used by pseudo-ethernet $peth\n"
+ if ($link eq $ifname);
}
print "Adding interface $ifname to bridge $newbridge\n";
diff --git a/templates/interfaces/bonding/node.tag/description/node.def b/templates/interfaces/bonding/node.tag/description/node.def
index e4807d2f..c6d2789d 100644
--- a/templates/interfaces/bonding/node.tag/description/node.def
+++ b/templates/interfaces/bonding/node.tag/description/node.def
@@ -1,4 +1,8 @@
type: txt
help: Description
+
+syntax:expression: pattern $VAR(@) "^.{1,256}$" \
+ ; "interface description is too long (limit 256 characters)"
+
update: sudo sh -c "echo \"$VAR(@)\" >/sys/class/net/$VAR(../@)/ifalias"
delete: sudo sh -c "echo '' >/sys/class/net/$VAR(../@)/ifalias"
diff --git a/templates/interfaces/bonding/node.tag/vif/node.tag/description/node.def b/templates/interfaces/bonding/node.tag/vif/node.tag/description/node.def
index ce6c5fd0..a0b29f05 100644
--- a/templates/interfaces/bonding/node.tag/vif/node.tag/description/node.def
+++ b/templates/interfaces/bonding/node.tag/vif/node.tag/description/node.def
@@ -1,4 +1,8 @@
type: txt
help: Description
+
+syntax:expression: pattern $VAR(@) "^.{1,256}$" \
+ ; "interface description is too long (limit 256 characters)"
+
update: sudo sh -c "echo \"$VAR(@)\" >/sys/class/net/$VAR(../../@).$VAR(../@)/ifalias"
delete: sudo sh -c "echo '' >/sys/class/net/$VAR(../../@).$VAR(../@)/ifalias"
diff --git a/templates/interfaces/bonding/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/interface/description/node.def b/templates/interfaces/bonding/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/interface/description/node.def
index 7d3ab379..a0f78074 100644
--- a/templates/interfaces/bonding/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/interface/description/node.def
+++ b/templates/interfaces/bonding/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/interface/description/node.def
@@ -1,5 +1,9 @@
priority: 820 # after vrrp
type: txt
+
+syntax:expression: pattern $VAR(@) "^.{1,256}$" \
+ ; "interface description is too long (limit 256 characters)"
+
help: Description for this interface
update: sudo sh -c "echo \"$VAR(@)\" >/sys/class/net/$VAR(../../../../../@).$VAR(../../../../@)v$VAR(../../@)/ifalias"
delete: sudo sh -c "echo '' >/sys/class/net/$VAR(../../../../../@).$VAR(../../../../@)v$VAR(../../@)/ifalias"
diff --git a/templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.tag/interface/description/node.def b/templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.tag/interface/description/node.def
index 75400c58..df48a57b 100644
--- a/templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.tag/interface/description/node.def
+++ b/templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.tag/interface/description/node.def
@@ -1,5 +1,9 @@
priority: 820 # after vrrp
type: txt
+
+syntax:expression: pattern $VAR(@) "^.{1,256}$" \
+ ; "interface description is too long (limit 256 characters)"
+
help: Description for this interface
update: sudo sh -c "echo \"$VAR(@)\" >/sys/class/net/$VAR(../../../../@)v$VAR(../../@)/ifalias"
delete: sudo sh -c "echo '' >/sys/class/net/$VAR(../../../../@)v$VAR(../../@)/ifalias"
diff --git a/templates/interfaces/bridge/node.tag/description/node.def b/templates/interfaces/bridge/node.tag/description/node.def
index e4807d2f..c6d2789d 100644
--- a/templates/interfaces/bridge/node.tag/description/node.def
+++ b/templates/interfaces/bridge/node.tag/description/node.def
@@ -1,4 +1,8 @@
type: txt
help: Description
+
+syntax:expression: pattern $VAR(@) "^.{1,256}$" \
+ ; "interface description is too long (limit 256 characters)"
+
update: sudo sh -c "echo \"$VAR(@)\" >/sys/class/net/$VAR(../@)/ifalias"
delete: sudo sh -c "echo '' >/sys/class/net/$VAR(../@)/ifalias"
diff --git a/templates/interfaces/ethernet/node.tag/description/node.def b/templates/interfaces/ethernet/node.tag/description/node.def
index e4807d2f..c6d2789d 100644
--- a/templates/interfaces/ethernet/node.tag/description/node.def
+++ b/templates/interfaces/ethernet/node.tag/description/node.def
@@ -1,4 +1,8 @@
type: txt
help: Description
+
+syntax:expression: pattern $VAR(@) "^.{1,256}$" \
+ ; "interface description is too long (limit 256 characters)"
+
update: sudo sh -c "echo \"$VAR(@)\" >/sys/class/net/$VAR(../@)/ifalias"
delete: sudo sh -c "echo '' >/sys/class/net/$VAR(../@)/ifalias"
diff --git a/templates/interfaces/ethernet/node.tag/vif/node.tag/description/node.def b/templates/interfaces/ethernet/node.tag/vif/node.tag/description/node.def
index ce6c5fd0..a0b29f05 100644
--- a/templates/interfaces/ethernet/node.tag/vif/node.tag/description/node.def
+++ b/templates/interfaces/ethernet/node.tag/vif/node.tag/description/node.def
@@ -1,4 +1,8 @@
type: txt
help: Description
+
+syntax:expression: pattern $VAR(@) "^.{1,256}$" \
+ ; "interface description is too long (limit 256 characters)"
+
update: sudo sh -c "echo \"$VAR(@)\" >/sys/class/net/$VAR(../../@).$VAR(../@)/ifalias"
delete: sudo sh -c "echo '' >/sys/class/net/$VAR(../../@).$VAR(../@)/ifalias"
diff --git a/templates/interfaces/ethernet/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/interface/description/node.def b/templates/interfaces/ethernet/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/interface/description/node.def
index 7d3ab379..a0f78074 100644
--- a/templates/interfaces/ethernet/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/interface/description/node.def
+++ b/templates/interfaces/ethernet/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/interface/description/node.def
@@ -1,5 +1,9 @@
priority: 820 # after vrrp
type: txt
+
+syntax:expression: pattern $VAR(@) "^.{1,256}$" \
+ ; "interface description is too long (limit 256 characters)"
+
help: Description for this interface
update: sudo sh -c "echo \"$VAR(@)\" >/sys/class/net/$VAR(../../../../../@).$VAR(../../../../@)v$VAR(../../@)/ifalias"
delete: sudo sh -c "echo '' >/sys/class/net/$VAR(../../../../../@).$VAR(../../../../@)v$VAR(../../@)/ifalias"
diff --git a/templates/interfaces/ethernet/node.tag/vrrp/vrrp-group/node.tag/interface/description/node.def b/templates/interfaces/ethernet/node.tag/vrrp/vrrp-group/node.tag/interface/description/node.def
index 75400c58..df48a57b 100644
--- a/templates/interfaces/ethernet/node.tag/vrrp/vrrp-group/node.tag/interface/description/node.def
+++ b/templates/interfaces/ethernet/node.tag/vrrp/vrrp-group/node.tag/interface/description/node.def
@@ -1,5 +1,9 @@
priority: 820 # after vrrp
type: txt
+
+syntax:expression: pattern $VAR(@) "^.{1,256}$" \
+ ; "interface description is too long (limit 256 characters)"
+
help: Description for this interface
update: sudo sh -c "echo \"$VAR(@)\" >/sys/class/net/$VAR(../../../../@)v$VAR(../../@)/ifalias"
delete: sudo sh -c "echo '' >/sys/class/net/$VAR(../../../../@)v$VAR(../../@)/ifalias"
diff --git a/templates/interfaces/loopback/node.tag/description/node.def b/templates/interfaces/loopback/node.tag/description/node.def
index e4807d2f..c6d2789d 100644
--- a/templates/interfaces/loopback/node.tag/description/node.def
+++ b/templates/interfaces/loopback/node.tag/description/node.def
@@ -1,4 +1,8 @@
type: txt
help: Description
+
+syntax:expression: pattern $VAR(@) "^.{1,256}$" \
+ ; "interface description is too long (limit 256 characters)"
+
update: sudo sh -c "echo \"$VAR(@)\" >/sys/class/net/$VAR(../@)/ifalias"
delete: sudo sh -c "echo '' >/sys/class/net/$VAR(../@)/ifalias"
diff --git a/templates/interfaces/pseudo-ethernet/node.tag/description/node.def b/templates/interfaces/pseudo-ethernet/node.tag/description/node.def
index e2a1534b..e57584a8 100644
--- a/templates/interfaces/pseudo-ethernet/node.tag/description/node.def
+++ b/templates/interfaces/pseudo-ethernet/node.tag/description/node.def
@@ -1,4 +1,8 @@
type: txt
help: Description for this interface
+
+syntax:expression: pattern $VAR(@) "^.{1,256}$" \
+ ; "interface description is too long (limit 256 characters)"
+
update: sudo sh -c "echo \"$VAR(@)\" >/sys/class/net/$VAR(../@)/ifalias"
delete: sudo sh -c "echo '' >/sys/class/net/$VAR(../@)/ifalias"
diff --git a/templates/interfaces/pseudo-ethernet/node.tag/vif/node.tag/description/node.def b/templates/interfaces/pseudo-ethernet/node.tag/vif/node.tag/description/node.def
index ce6c5fd0..a0b29f05 100644
--- a/templates/interfaces/pseudo-ethernet/node.tag/vif/node.tag/description/node.def
+++ b/templates/interfaces/pseudo-ethernet/node.tag/vif/node.tag/description/node.def
@@ -1,4 +1,8 @@
type: txt
help: Description
+
+syntax:expression: pattern $VAR(@) "^.{1,256}$" \
+ ; "interface description is too long (limit 256 characters)"
+
update: sudo sh -c "echo \"$VAR(@)\" >/sys/class/net/$VAR(../../@).$VAR(../@)/ifalias"
delete: sudo sh -c "echo '' >/sys/class/net/$VAR(../../@).$VAR(../@)/ifalias"
diff --git a/templates/interfaces/tunnel/node.tag/description/node.def b/templates/interfaces/tunnel/node.tag/description/node.def
index e4807d2f..c6d2789d 100644
--- a/templates/interfaces/tunnel/node.tag/description/node.def
+++ b/templates/interfaces/tunnel/node.tag/description/node.def
@@ -1,4 +1,8 @@
type: txt
help: Description
+
+syntax:expression: pattern $VAR(@) "^.{1,256}$" \
+ ; "interface description is too long (limit 256 characters)"
+
update: sudo sh -c "echo \"$VAR(@)\" >/sys/class/net/$VAR(../@)/ifalias"
delete: sudo sh -c "echo '' >/sys/class/net/$VAR(../@)/ifalias"