Merge branch 'next' of ssh://git.ipfire.org/pub/git/ipfire-2.x into next
authorArne Fitzenreiter <arne_f@ipfire.org>
Thu, 28 Feb 2013 23:07:49 +0000 (00:07 +0100)
committerArne Fitzenreiter <arne_f@ipfire.org>
Thu, 28 Feb 2013 23:07:49 +0000 (00:07 +0100)
config/rootfiles/core/67/exclude [new file with mode: 0644]
config/rootfiles/core/67/filelists/files [new file with mode: 0644]
config/rootfiles/core/67/meta [new file with mode: 0644]
config/rootfiles/core/67/update.sh [new file with mode: 0644]
config/rootfiles/installer/network-modules
html/cgi-bin/wlanap.cgi
lfs/hostapd
lfs/mISDN
make.sh
src/install+setup/install/mountdest.sh

diff --git a/config/rootfiles/core/67/exclude b/config/rootfiles/core/67/exclude
new file mode 100644 (file)
index 0000000..18141fd
--- /dev/null
@@ -0,0 +1,16 @@
+srv/web/ipfire/html/proxy.pac
+etc/udev/rules.d/30-persistent-network.rules
+etc/collectd.custom
+etc/shadow
+etc/ipsec.conf
+etc/ipsec.secrets
+etc/ipsec.user.conf
+etc/ipsec.user.secrets
+var/log/cache
+var/updatecache
+etc/localtime
+var/ipfire/ovpn
+etc/ssh/ssh_config
+etc/ssh/sshd_config
+etc/ssl/openssl.cnf
+var/state/dhcp/dhcpd.leases
diff --git a/config/rootfiles/core/67/filelists/files b/config/rootfiles/core/67/filelists/files
new file mode 100644 (file)
index 0000000..168c7d1
--- /dev/null
@@ -0,0 +1,3 @@
+etc/system-release
+etc/issue
+var/ipfire/langs
diff --git a/config/rootfiles/core/67/meta b/config/rootfiles/core/67/meta
new file mode 100644 (file)
index 0000000..d547fa8
--- /dev/null
@@ -0,0 +1 @@
+DEPS=""
diff --git a/config/rootfiles/core/67/update.sh b/config/rootfiles/core/67/update.sh
new file mode 100644 (file)
index 0000000..142457a
--- /dev/null
@@ -0,0 +1,89 @@
+#!/bin/bash
+############################################################################
+#                                                                          #
+# This file is part of the IPFire Firewall.                                #
+#                                                                          #
+# IPFire 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 3 of the License, or        #
+# (at your option) any later version.                                      #
+#                                                                          #
+# IPFire 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 IPFire; if not, write to the Free Software                    #
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA #
+#                                                                          #
+# Copyright (C) 2013 IPFire-Team <info@ipfire.org>.                        #
+#                                                                          #
+############################################################################
+#
+. /opt/pakfire/lib/functions.sh
+/usr/local/bin/backupctrl exclude >/dev/null 2>&1
+
+#
+# Remove old core updates from pakfire cache to save space...
+core=67
+for (( i=1; i<=$core; i++ ))
+do
+       rm -f /var/cache/pakfire/core-upgrade-*-$i.ipfire
+done
+
+#
+#Stop services
+
+#
+#Extract files
+extract_files
+
+#
+#Start services
+
+#
+#Update Language cache
+perl -e "require '/var/ipfire/lang.pl'; &Lang::BuildCacheLang"
+
+#remove wrong mISDN modules
+rm -rf /lib/modules/*-ipfire*/kernel/drivers/isdn/mISDN
+rm -rf /lib/modules/*-ipfire*/kernel/drivers/isdn/hardware/mISDN
+
+#remove pae kernel from pakfire cache to force reload if it should reinstalled
+rm -rf /var/cache/pakfire/linux-pae*.ipfire
+
+#Rebuild module dep's
+arch=`uname -m`
+if [ ${arch::3} == "arm" ]; then
+       depmod -a 3.2.38-ipfire-kirkwood >/dev/null 2>&1
+       depmod -a 3.2.38-ipfire-omap >/dev/null 2>&1
+       depmod -a 3.2.38-ipfire-rpi >/dev/null 2>&1
+else
+       depmod -a 3.2.38-ipfire     >/dev/null 2>&1
+       depmod -a 3.2.38-ipfire-pae >/dev/null 2>&1
+       depmod -a 2.6.32.60-ipfire-xen >/dev/null 2>&1
+fi
+
+#Rebuild initrd's
+if [ -e /boot/ipfirerd-3.2.38.img ]; then
+/sbin/dracut --force --verbose /boot/ipfirerd-3.2.38.img 3.2.38-ipfire
+fi
+if [ -e /boot/ipfirerd-3.2.38-pae.img ]; then
+/sbin/dracut --force --verbose /boot/ipfirerd-3.2.38-pae.img 3.2.38-ipfire-pae
+fi
+if [ -e /boot/ipfirerd-2.6.32.60-xen.img ]; then
+/sbin/dracut --force --verbose /boot/ipfirerd-2.6.32.60-xen.img 2.6.32.60-ipfire-xen
+fi
+
+sync
+
+# This update need a reboot...
+touch /var/run/need_reboot
+
+#
+#Finish
+/etc/init.d/fireinfo start
+sendprofile
+#Don't report the exitcode last command
+exit 0
index 50c2179c2ad055c2f7b51023a8dfc035daf8ea7d..6dabddfeb47664a7760f83ce27ba219e9fa6b5ac 100644 (file)
@@ -1,176 +1 @@
-lib/modules/KVER-ipfire/kernel/drivers/net/3c501.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/3c503.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/3c505.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/3c507.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/3c509.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/3c515.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/3c523.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/3c527.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/3c59x.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/8139cp.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/8139too.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/82596.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/8390.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/8390p.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/ac3200.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/acenic.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/amd8111e.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/at1700.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/atl1c/atl1c.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/atl1e/atl1e.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/atlx/atl1.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/atlx/atl2.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/atp.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/b44.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/benet/be2net.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/bnx2.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/bnx2x.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/bsd_comp.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/cassini.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/chelsio/cxgb.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/cnic.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/cs89x0.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/cxgb3/cxgb3.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/de600.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/de620.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/depca.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/dl2k.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/dnet.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/dummy.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/e100.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/e1000/e1000.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/e1000e/e1000e.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/e2100.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/eepro.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/eexpress.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/enic/enic.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/epic100.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/eql.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/es3210.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/eth16i.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/ethoc.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/ewrk3.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/fealnx.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/forcedeth.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/hamachi.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/hp-plus.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/hp.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/hp100.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/ibmlana.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/ifb.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/igb/igb.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/igbvf/igbvf.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/imq.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/ipg.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/ixgb/ixgb.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/ixgbe/ixgbe.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/jme.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/ks8842.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/ks8851_mll.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/lance.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/lne390.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/lp486e.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/macvlan.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/mdio.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/mii.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/mlx4/mlx4_core.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/mlx4/mlx4_en.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/myri10ge/myri10ge.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/natsemi.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/ne.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/ne2.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/ne2k-pci.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/ne3210.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/netxen/netxen_nic.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/ni52.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/ni65.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/niu.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/ns83820.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/pcmcia/3c574_cs.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/pcmcia/3c589_cs.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/pcmcia/axnet_cs.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/pcmcia/fmvj18x_cs.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/pcmcia/nmclan_cs.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/pcmcia/pcnet_cs.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/pcmcia/smc91c92_cs.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/pcmcia/xirc2ps_cs.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/pcnet32.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/phy/broadcom.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/phy/cicada.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/phy/davicom.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/phy/et1011c.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/phy/icplus.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/phy/lxt.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/phy/marvell.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/phy/mdio-bitbang.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/phy/national.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/phy/qsemi.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/phy/realtek.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/phy/smsc.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/phy/ste10Xp.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/phy/vitesse.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/qla3xxx.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/qlge/qlge.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/r6040.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/r8169.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/s2io.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/sb1000.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/sc92031.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/seeq8005.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/sfc/sfc.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/sis190.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/sis900.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/skge.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/sky2.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/slhc.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/smc-mca.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/smc-ultra.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/smc-ultra32.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/smc9194.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/smsc9420.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/starfire.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/sundance.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/sungem.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/sungem_phy.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/sunhme.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/tehuti.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/tg3.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/tlan.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/tulip/de2104x.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/tulip/de4x5.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/tulip/dmfe.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/tulip/tulip.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/tulip/uli526x.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/tulip/winbond-840.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/tulip/xircom_cb.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/typhoon.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/usb/asix.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/usb/catc.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/usb/cdc-phonet.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/usb/cdc_eem.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/usb/cdc_ether.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/usb/cdc_subset.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/usb/dm9601.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/usb/gl620a.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/usb/hso.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/usb/int51x1.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/usb/kaweth.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/usb/mcs7830.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/usb/net1080.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/usb/pegasus.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/usb/plusb.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/usb/rndis_host.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/usb/rtl8150.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/usb/smsc95xx.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/usb/usbnet.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/usb/zaurus.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/veth.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/via-rhine.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/via-velocity.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/virtio_net.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/vmxnet3/vmxnet3.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/vxge/vxge.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/wd.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/yellowfin.ko
-lib/modules/KVER-ipfire/kernel/drivers/net/znet.ko
-lib/modules/KVER-ipfire/kernel/drivers/staging/et131x/et131x.ko
+lib/modules/KVER-ipfire/kernel/drivers/net
index ce8f051aa7cc944cd80c7a82a9089ed3f97495de..58c6376feac996a2bdb018370bdc0e63ce9cf48e 100644 (file)
@@ -131,7 +131,7 @@ if ( $wlanapsettings{'ACTION'} eq "$Lang::tr{'save'}" ){
                        $errormessage .= "$Lang::tr{'wlanap invalid wpa'}<br />";
                }
                # only ASCII alowed
-               if ( ($wlanapsettings{'PWD'} !~ m/[\x00-\x7f]/) ){
+               if ( !($wlanapsettings{'PWD'} !~ /[^\x00-\x7f]/) ){
                        $errormessage .= "$Lang::tr{'wlanap invalid wpa'}<br />";
                }
        }
@@ -529,10 +529,12 @@ sub WriteConfig_hostapd{
 
        open (CONFIGFILE, ">/var/ipfire/wlanap/hostapd.conf");
        print CONFIGFILE <<END
+driver=$wlanapsettings{'DRIVER_HOSTAPD'}
 ######################### basic hostapd configuration ##########################
 #
 interface=$wlanapsettings{'INTERFACE'}
-driver=$wlanapsettings{'DRIVER_HOSTAPD'}
+country_code=$wlanapsettings{'COUNTRY'}
+ieee80211d=1
 channel=$wlanapsettings{'CHANNEL'}
 END
 ;
index 690f138b792620f07a9dc1a5e4b421bd5d602fb1..ff02a1991404dd901b3398d0aab80d2e4206757c 100644 (file)
@@ -32,7 +32,7 @@ DL_FROM    = $(URL_IPFIRE)
 DIR_APP    = $(DIR_SRC)/$(THISAPP)
 TARGET     = $(DIR_INFO)/$(THISAPP)
 PROG       = hostapd
-PAK_VER    = 25
+PAK_VER    = 26
 
 DEPS       = ""
 
index 0fe76ec3758e82480ff9a688ab678e54fe7f36e6..57db77fa1e0b12372b238b174e93ac50fb155828 100644 (file)
--- a/lfs/mISDN
+++ b/lfs/mISDN
@@ -111,5 +111,9 @@ ifneq "$(XEN)" "1"
        sed -i -e "s|.ko||g" /etc/modprobe.d/mISDN
 endif
 
+       # Remove mISDN modules that was shipped with the kernel
+       rm -rf /lib/modules/$(KVER)-$(VERSUFIX)/kernel/drivers/isdn/mISDN
+       rm -rf /lib/modules/$(KVER)-$(VERSUFIX)/kernel/drivers/isdn/hardware/mISDN
+
        @rm -rf $(DIR_SRC)/mISDN*
        @$(POSTBUILD)
diff --git a/make.sh b/make.sh
index 54fb812c32daafda5031e86c467a28d6d0bc24a2..fda2bb7a19ff917e4732e193224ddc2998c59114 100755 (executable)
--- a/make.sh
+++ b/make.sh
@@ -25,7 +25,7 @@
 NAME="IPFire"                                                  # Software name
 SNAME="ipfire"                                                 # Short name
 VERSION="2.13"                                                 # Version number
-CORE="66"                                                      # Core Level (Filename)
+CORE="67"                                                      # Core Level (Filename)
 PAKFIRE_CORE="66"                                              # Core Level (PAKFIRE)
 GIT_BRANCH=`git status | head -n1 | cut -d" " -f4`             # Git Branch
 SLOGAN="www.ipfire.org"                                                # Software slogan
index e28a0689bd1c5a98e3bd8c81a1478bedb2fa17d0..16cf6ed4d3a6aa79fcc8a039dc4105a47dd73016 100644 (file)
@@ -111,11 +111,15 @@ for path in /sys/block/*; do
        echo "  OK, this is it..."
        echo -n "${device_}" > /tmp/dest_device
 
-       # Disk size to GiB.
-       device_size=$(( ${device_size} / 2097152 ))
-
-       # Build string with drive details
-       device_str="/dev/${device_} - ${device_size} GiB -"
+       if [ ${device_size} -gt 0 ]; then
+               # Disk size to GiB.
+               device_size=$(( ${device_size} / 2097152 ))
+
+               # Build string with drive details
+               device_str="/dev/${device_} - ${device_size} GiB -"
+       else
+               device_str="/dev/${device_} -"
+       fi
        device_str="${device_str} $(cat /sys/block/${device}/device/vendor)"
        device_str="${device_str} $(cat /sys/block/${device}/device/model)"