Add is_ubuntu function
This replaces all of the [[ "$os_PACKAGE" = "deb" ]] tests, except when
those tests are before straight calls to dpkg.
Change-Id: I8a3ebf1b1bc5a55d736f9258d5ba1d24dabf04ea
diff --git a/stack.sh b/stack.sh
index 55eafa8..9428356 100755
--- a/stack.sh
+++ b/stack.sh
@@ -677,7 +677,7 @@
# Install package requirements
echo_summary "Installing package prerequisites"
-if [[ "$os_PACKAGE" = "deb" ]]; then
+if is_ubuntu; then
install_package $(get_packages $FILES/apts)
elif is_suse; then
install_package $(get_packages $FILES/rpms-suse)
@@ -726,7 +726,7 @@
if is_quantum_ovs_base_plugin "$Q_PLUGIN"; then
# Install deps
# FIXME add to ``files/apts/quantum``, but don't install if not needed!
- if [[ "$os_PACKAGE" = "deb" ]]; then
+ if is_ubuntu; then
kernel_version=`cat /proc/version | cut -d " " -f3`
install_package make fakeroot dkms openvswitch-switch openvswitch-datapath-dkms linux-headers-$kernel_version
else