45 lines
1.7 KiB
Diff
45 lines
1.7 KiB
Diff
--- netcfg-1.176+11.0trisquel2/finish-install.d/55netcfg-copy-config 2022-11-21 19:21:58.138150737 -0600
|
|
+++ netcfg-1.176+11.0trisquel2/finish-install.d/55netcfg-copy-config__ 2022-11-21 19:21:50.646130993 -0600
|
|
@@ -17,19 +17,23 @@
|
|
exit 0
|
|
fi
|
|
|
|
+# The type of the connection used during installation
|
|
+NETCFG_CONNECTION_TYPE=$(cat $FILE_NETCFG_CONNECTION_TYPE | \
|
|
+ grep "connection type" | cut -d ':' -f2 | sed 's/ //g')
|
|
+NETCFG_CONNECTION_SECURITY=$(cat $FILE_NETCFG_CONNECTION_TYPE | \
|
|
+ grep "security" | cut -d ':' -f2 | sed 's/ //g')
|
|
+
|
|
# Flag to determine whether Network Manager is installed.
|
|
if in-target sh -c "dpkg-query -s network-manager 2>/dev/null | grep -q '^Status: install ok installed'"; then
|
|
NM_IS_INSTALLED=true
|
|
else
|
|
NM_IS_INSTALLED=false
|
|
+ chroot /target apt-get -y install ifupdown
|
|
+ if [ "$NETCFG_CONNECTION_TYPE" = "wireless" ]; then
|
|
+ chroot /target apt-get -y install wireless-tools
|
|
+ fi
|
|
fi
|
|
|
|
-# The type of the connection used during installation
|
|
-NETCFG_CONNECTION_TYPE=$(cat $FILE_NETCFG_CONNECTION_TYPE | \
|
|
- grep "connection type" | cut -d ':' -f2 | sed 's/ //g')
|
|
-NETCFG_CONNECTION_SECURITY=$(cat $FILE_NETCFG_CONNECTION_TYPE | \
|
|
- grep "security" | cut -d ':' -f2 | sed 's/ //g')
|
|
-
|
|
# netcfg/target_network_config question values
|
|
CONFIG_NM="nm_config"
|
|
CONFIG_INTERFACES="ifupdown"
|
|
@@ -43,11 +47,7 @@
|
|
if $NM_IS_INSTALLED; then
|
|
db_set netcfg/target_network_config $CONFIG_NM
|
|
else
|
|
- if [ "$NETCFG_CONNECTION_TYPE" = "wired" ]; then
|
|
- db_set netcfg/target_network_config $CONFIG_INTERFACES
|
|
- else # wireless
|
|
- db_set netcfg/target_network_config $CONFIG_LOOPBACK
|
|
- fi
|
|
+ db_set netcfg/target_network_config $CONFIG_INTERFACES
|
|
fi
|
|
fi
|
|
|