netbase: Parse .config file instead of /boot/config*
When building an RPM based system, the linux kernel image was installed after the netbase image so the /boot/config* file was not found. Strangely that worked fine on IPK based systems. Fixes https://jira.digi.com/browse/DEL-364 Signed-off-by: Alex Gonzalez <alex.gonzalez@digi.com>
This commit is contained in:
parent
119249b813
commit
788eb89aeb
|
|
@ -20,7 +20,7 @@ pkg_postinst_${PN} () {
|
||||||
cat << EOF > $D${sysconfdir}/network/interfaces
|
cat << EOF > $D${sysconfdir}/network/interfaces
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
cat $D/boot/config* | /bin/grep CONFIG_BLK_DEV_LOOP=
|
/bin/grep -q "CONFIG_BLK_DEV_LOOP=" ${STAGING_KERNEL_DIR}/.config
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
cat << EOF >> $D${sysconfdir}/network/interfaces
|
cat << EOF >> $D${sysconfdir}/network/interfaces
|
||||||
# The loopback interface
|
# The loopback interface
|
||||||
|
|
@ -29,7 +29,7 @@ iface lo inet loopback
|
||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cat $D/boot/config* | /bin/grep CONFIG_FEC=
|
/bin/grep -q "CONFIG_FEC=" ${STAGING_KERNEL_DIR}/.config
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
# Primary wired interface
|
# Primary wired interface
|
||||||
cat << EOF >> $D${sysconfdir}/network/interfaces
|
cat << EOF >> $D${sysconfdir}/network/interfaces
|
||||||
|
|
@ -46,7 +46,7 @@ EOF
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Secondary wired interface on MXC platforms
|
# Secondary wired interface on MXC platforms
|
||||||
cat $D/boot/config* | /bin/grep CONFIG_SMSC911X=
|
/bin/grep -q "CONFIG_SMSC911X=" ${STAGING_KERNEL_DIR}/.config
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
cat << EOF >> $D${sysconfdir}/network/interfaces
|
cat << EOF >> $D${sysconfdir}/network/interfaces
|
||||||
auto eth1
|
auto eth1
|
||||||
|
|
@ -62,7 +62,7 @@ EOF
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Secondary wired interface on MXS platforms
|
# Secondary wired interface on MXS platforms
|
||||||
cat $D/boot/config* | /bin/grep CONFIG_CCARDIMX28_ENET1=
|
/bin/grep -q "CONFIG_CCARDIMX28_ENET1=" ${STAGING_KERNEL_DIR}/.config
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
cat << EOF >> $D${sysconfdir}/network/interfaces
|
cat << EOF >> $D${sysconfdir}/network/interfaces
|
||||||
auto eth1
|
auto eth1
|
||||||
|
|
@ -78,7 +78,7 @@ EOF
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Wireless interface
|
# Wireless interface
|
||||||
cat $D/boot/config* | /bin/grep CONFIG_WIRELESS=
|
/bin/grep -q "CONFIG_WIRELESS=" ${STAGING_KERNEL_DIR}/.config
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
cat << EOF >> $D${sysconfdir}/network/interfaces
|
cat << EOF >> $D${sysconfdir}/network/interfaces
|
||||||
auto wlan0
|
auto wlan0
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue