1 |
#!/bin/bash |
#!/bin/bash |
2 |
|
# $Id$ |
3 |
# <niro@magellan-linux.de> |
# <niro@magellan-linux.de> |
4 |
|
|
5 |
#%rlevels: 7:s 0:k 6:k |
#%rlevels: 7:s 0:k |
6 |
#%start: 41 |
#%start: 41 |
7 |
#%stop: 01 |
#%stop: 01 |
8 |
|
|
11 |
#%before: |
#%before: |
12 |
#%after: |
#%after: |
13 |
|
|
|
# $Header: /home/cvsd/alx-cvs/alx-src/alxconfig-ng/init.d/alxsettings,v 1.22 2005-09-22 22:14:38 niro Exp $ |
|
|
|
|
14 |
# checks first if the client was already configured and if it has an valid serial |
# checks first if the client was already configured and if it has an valid serial |
15 |
# if not it runs the autoconfiguration script |
# if not it runs the autoconfiguration script |
16 |
# these settings will be used for client setup |
# these settings will be used for client setup |
19 |
# if no changes are at server side they will be kept, if yes the get updated. |
# if no changes are at server side they will be kept, if yes the get updated. |
20 |
# the server settings has higher priority. |
# the server settings has higher priority. |
21 |
|
|
22 |
source /etc/sysconfig/rc |
source /etc/conf.d/rc |
23 |
source $rc_functions |
source $rc_functions |
24 |
|
|
25 |
# mysql settings |
# mysql settings |
35 |
source /usr/lib/alxconfig-ng/functions/config_x11 |
source /usr/lib/alxconfig-ng/functions/config_x11 |
36 |
source /usr/lib/alxconfig-ng/functions/config_auth |
source /usr/lib/alxconfig-ng/functions/config_auth |
37 |
source /usr/lib/alxconfig-ng/functions/config_ssh_auth |
source /usr/lib/alxconfig-ng/functions/config_ssh_auth |
38 |
|
source /usr/lib/alxconfig-ng/functions/config_versions |
|
# check if mysql is available |
|
|
[ -x /usr/bin/mysql ] && MYSQL_ALX=true |
|
39 |
|
|
40 |
# other needed vars |
# other needed vars |
41 |
ALX_HW_DETECT=false |
ALX_HW_DETECT=false |
89 |
|
|
90 |
# exchange ssh rsa keys |
# exchange ssh rsa keys |
91 |
HOME=/root config_ssh_auth |
HOME=/root config_ssh_auth |
92 |
|
|
93 |
|
# import version info |
94 |
|
config_version |
95 |
} |
} |
96 |
|
|
97 |
get_system_serial() |
get_system_serial() |
98 |
{ |
{ |
99 |
|
local CUR_IP CUR_MAC CUR_MTIME ALX_IFACE |
100 |
|
|
101 |
local CUR_IP CUR_MAC CUR_MTIME |
if [[ ${ALX_CONFD_NETWORKING} = true ]] |
102 |
|
then |
103 |
|
ALX_IFACE="$(< ${SETTINGSPATH}/confd-networking)" |
104 |
|
else |
105 |
|
ALX_IFACE="eth0" |
106 |
|
fi |
107 |
|
|
108 |
# check if serial file exists |
# check if serial file exists |
109 |
if [ -f /etc/alxconfig-ng/serial ] && [[ ${ALX_FORCED_RECHECK} = false ]] |
if [ -f /etc/alxconfig-ng/serial ] && [[ ${ALX_FORCED_RECHECK} = false ]] |
121 |
exit 1 |
exit 1 |
122 |
fi |
fi |
123 |
|
|
124 |
CUR_IP=$(/sbin/ifconfig eth0 | sed -n '/addr:/s/ [^r]*..//gp') |
CUR_IP=$(ifconfig ${ALX_IFACE} | sed -n '/addr:/s/ [^r]*..//gp') |
125 |
CUR_MAC=$(/sbin/ifconfig eth0 | grep HWaddr | cut -d ' ' -f11) |
CUR_MAC=$(ifconfig ${ALX_IFACE} | grep HWaddr | cut -d ' ' -f11) |
126 |
CUR_MTIME=$(date +%s) |
CUR_MTIME=$(date +%s) |
127 |
|
|
128 |
echo -e ${COLOREDSTAR} "Trying to validate my serial ..." |
echo -e ${COLOREDSTAR} "Trying to validate my serial ..." |
138 |
else |
else |
139 |
# abort on non valid serial |
# abort on non valid serial |
140 |
ALX_STATE="invalid serial" |
ALX_STATE="invalid serial" |
141 |
echo "ALX_STATE=${ALX_STATE}" > /etc/alxconfig-ng/state/state |
echo "ALX_STATE=\"${ALX_STATE}\"" > /etc/alxconfig-ng/state/state |
142 |
show_invalid_serial_msg |
show_invalid_serial_msg |
143 |
exit 1 |
exit 1 |
144 |
fi |
fi |
149 |
if [[ ${ALX_FORCED_RECHECK} = true ]] |
if [[ ${ALX_FORCED_RECHECK} = true ]] |
150 |
then |
then |
151 |
echo -e ${COLMAGENTA}"Hardware autodetection forced by system-administrator"${COLDEFAULT} |
echo -e ${COLMAGENTA}"Hardware autodetection forced by system-administrator"${COLDEFAULT} |
152 |
|
# always disable CONFD_NETWORKING here |
153 |
|
export ALX_CONFD_NETWORKING="false" |
154 |
else |
else |
155 |
echo -e ${COLMAGENTA}"Preparing system for first boot"${COLDEFAULT} |
echo -e ${COLMAGENTA}"Preparing system for first boot"${COLDEFAULT} |
156 |
fi |
fi |
206 |
fi |
fi |
207 |
|
|
208 |
# write current state to temp file |
# write current state to temp file |
209 |
echo "ALX_STATE=${ALX_STATE}" > /etc/alxconfig-ng/state/state |
echo "ALX_STATE=\"${ALX_STATE}\"" > /etc/alxconfig-ng/state/state |
210 |
[ -f /hardware-auto-detection ] && rm /hardware-auto-detection |
[ -f /hardware-auto-detection ] && rm /hardware-auto-detection |
211 |
|
|
212 |
# now export ALX_FORCED_RECHECK=true |
# now export ALX_FORCED_RECHECK=true |
218 |
echo -e ${COLOREDSTAR} "Trying to get new serial ..." |
echo -e ${COLOREDSTAR} "Trying to get new serial ..." |
219 |
|
|
220 |
# request a new serial; one command now (cause must be done in the same session) |
# request a new serial; one command now (cause must be done in the same session) |
221 |
ALX_SERIAL=$(mysql_command ${SQL_USER} ${SQL_PASS} ${SQL_HOST} ${SQL_DB} \ |
ALX_SERIAL=$(mysqldo "insert into client_serials (mtime, mac) values('${CUR_MTIME}','${CUR_MAC}'); |
|
"insert into client_serials (mtime, mac) values('${CUR_MTIME}','${CUR_MAC}'); |
|
222 |
select last_insert_id();") |
select last_insert_id();") |
223 |
|
|
224 |
if [[ ${ALX_SERIAL} != NULL ]] |
if [[ ${ALX_SERIAL} != NULL ]] |
228 |
$SET_WCOL |
$SET_WCOL |
229 |
echo "[ SN: ${ALX_SERIAL} ]" |
echo "[ SN: ${ALX_SERIAL} ]" |
230 |
|
|
231 |
# set ALX_STATE to ok so everybody that everything was ok |
# set ALX_STATE to ok so everybody knows that everything was ok |
232 |
ALX_STATE=ok |
ALX_STATE=ok |
233 |
|
|
234 |
echo "ALX_SERIAL=${ALX_SERIAL}" > /etc/alxconfig-ng/serial |
echo "ALX_SERIAL=\"${ALX_SERIAL}\"" > /etc/alxconfig-ng/serial |
235 |
echo "ALX_REG_DATE=${CUR_MTIME}" >> /etc/alxconfig-ng/serial |
echo "ALX_REG_DATE=\"${CUR_MTIME}\"" >> /etc/alxconfig-ng/serial |
236 |
|
|
237 |
evaluate_retval |
evaluate_retval |
238 |
else |
else |
251 |
fi |
fi |
252 |
|
|
253 |
# write current state to temp file |
# write current state to temp file |
254 |
echo "ALX_STATE=${ALX_STATE}" > /etc/alxconfig-ng/state/state |
echo "ALX_STATE=\"${ALX_STATE}\"" > /etc/alxconfig-ng/state/state |
255 |
|
echo "ALX_IFACE=\"${ALX_IFACE}\"" >> /etc/alxconfig-ng/state/state |
256 |
} |
} |
257 |
|
|
258 |
|
|
302 |
source ${network_settings}/net.${iface} || exit 1 |
source ${network_settings}/net.${iface} || exit 1 |
303 |
NETCARD_DRIVER="$(cat /etc/modules.d/net.${iface} | cut -d' ' -f3)" |
NETCARD_DRIVER="$(cat /etc/modules.d/net.${iface} | cut -d' ' -f3)" |
304 |
|
|
305 |
mysql_command ${SQL_USER} ${SQL_PASS} ${SQL_HOST} ${SQL_DB} \ |
mysqldo "insert into cfg_network( |
|
"insert into cfg_network( |
|
306 |
hostname, |
hostname, |
307 |
serial, |
serial, |
308 |
module, |
module, |
353 |
break |
break |
354 |
done |
done |
355 |
else |
else |
356 |
mysql_command ${SQL_USER} ${SQL_PASS} ${SQL_HOST} ${SQL_DB} \ |
mysqldo "insert into cfg_network( |
|
"insert into cfg_network( |
|
357 |
hostname, |
hostname, |
358 |
serial, |
serial, |
359 |
module, |
module, |
373 |
# xserver |
# xserver |
374 |
echo -e " Graphic settings ..." |
echo -e " Graphic settings ..." |
375 |
# xserver general |
# xserver general |
376 |
( mysql_command ${SQL_USER} ${SQL_PASS} ${SQL_HOST} ${SQL_DB} \ |
( mysqldo "insert into cfg_graphic( |
|
"insert into cfg_graphic( |
|
377 |
serial, |
serial, |
378 |
module, |
module, |
379 |
resolution, |
resolution, |
380 |
depth, |
depth, |
381 |
monitorid |
refresh_rate |
382 |
) |
) |
383 |
values( |
values( |
384 |
'${ALX_SERIAL}', |
'${ALX_SERIAL}', |
385 |
'${XMODULE}', |
'${XMODULE}', |
386 |
'1024x768', |
'1024x768', |
387 |
'16', |
'16', |
388 |
'0' |
'60' |
389 |
);"; ) |
);"; ) |
390 |
evaluate_retval |
evaluate_retval |
391 |
|
|
392 |
# input |
# input |
393 |
echo -e " Input settings ..." |
echo -e " Input settings ..." |
394 |
mysql_command ${SQL_USER} ${SQL_PASS} ${SQL_HOST} ${SQL_DB} \ |
mysqldo "insert into cfg_input(serial,mouse) values('${ALX_SERIAL}','${XMOUSETYPE}');" |
|
"insert into cfg_input(serial,mouse) values('${ALX_SERIAL}','${XMOUSETYPE}');" |
|
395 |
evaluate_retval |
evaluate_retval |
396 |
|
|
397 |
# auth |
# auth |
398 |
echo -e " Authentifcation settings ..." |
echo -e " Authentification settings ..." |
399 |
mysql_command ${SQL_USER} ${SQL_PASS} ${SQL_HOST} ${SQL_DB} \ |
mysqldo "insert into client_auth( |
|
"insert into client_auth( |
|
400 |
serial, |
serial, |
401 |
username, |
username, |
402 |
shell, |
shell, |
416 |
|
|
417 |
# exchange ssh rsa keys - the first boot needs this ! |
# exchange ssh rsa keys - the first boot needs this ! |
418 |
# or no reboot will work via the webadmin |
# or no reboot will work via the webadmin |
419 |
echo -e " SSH authentifcation settings ..." |
echo -e " SSH authentification settings ..." |
420 |
HOME=/root config_ssh_auth |
HOME=/root config_ssh_auth |
421 |
evaluate_retval |
evaluate_retval |
422 |
|
|
423 |
# input |
# autostart |
424 |
echo -e " Autostart settings ..." |
echo -e " Autostart settings ..." |
425 |
mysql_command ${SQL_USER} ${SQL_PASS} ${SQL_HOST} ${SQL_DB} \ |
mysqldo "insert into cfg_autostart(serial,session) values('${ALX_SERIAL}','');" |
426 |
"insert into cfg_autostart(serial,session) values('${ALX_SERIAL}','');" |
|
427 |
|
# screensaver |
428 |
|
echo -e " Screensaver settings ..." |
429 |
|
mysqldo "insert into cfg_screensaver(serial,screensaver) values('${ALX_SERIAL}','')" |
430 |
|
|
431 |
|
# version info |
432 |
|
local alx_os |
433 |
|
local alx_utils |
434 |
|
alx_os="$(< /etc/mageversion)" |
435 |
|
alx_utils="$(magequery -n alxconfig-ng-alx | sed 's:.*\[\ \(.*\)\ \].*:\1:')" |
436 |
|
alx_utils="${alx_utils/alxconfig-ng-alx-}" |
437 |
|
mysqldo "insert into client_version(serial,os,utils) values('${ALX_SERIAL}','${alx_os}','${alx_utils}')" |
438 |
|
|
439 |
evaluate_retval |
evaluate_retval |
440 |
} |
} |
441 |
|
|
475 |
source ${network_settings}/net.${iface} || exit 1 |
source ${network_settings}/net.${iface} || exit 1 |
476 |
NETCARD_DRIVER="$(cat /etc/modules.d/net.${iface} | cut -d' ' -f3)" |
NETCARD_DRIVER="$(cat /etc/modules.d/net.${iface} | cut -d' ' -f3)" |
477 |
|
|
478 |
mysql_command ${SQL_USER} ${SQL_PASS} ${SQL_HOST} ${SQL_DB} \ |
mysqldo "update cfg_network set |
|
"update cfg_network set |
|
479 |
hostname='${ALX_DEFAULT_HOSTNAME}', |
hostname='${ALX_DEFAULT_HOSTNAME}', |
480 |
module='${NETCARD_DRIVER}', |
module='${NETCARD_DRIVER}', |
481 |
domain='${ALX_DEFAULT_DOMAIN}', |
domain='${ALX_DEFAULT_DOMAIN}', |
502 |
break |
break |
503 |
done |
done |
504 |
else |
else |
505 |
mysql_command ${SQL_USER} ${SQL_PASS} ${SQL_HOST} ${SQL_DB} \ |
mysqldo "update cfg_network set |
|
"update cfg_network set |
|
506 |
hostname='${ALX_DEFAULT_HOSTNAME}', |
hostname='${ALX_DEFAULT_HOSTNAME}', |
507 |
module='${NETCARD_DRIVER}', |
module='${NETCARD_DRIVER}', |
508 |
domain='${ALX_DEFAULT_DOMAIN}', |
domain='${ALX_DEFAULT_DOMAIN}', |
514 |
# xserver |
# xserver |
515 |
echo -e " Graphic settings ..." |
echo -e " Graphic settings ..." |
516 |
# xserver general |
# xserver general |
517 |
mysql_command ${SQL_USER} ${SQL_PASS} ${SQL_HOST} ${SQL_DB} \ |
mysqldo "update cfg_graphic set |
|
"update cfg_graphic set |
|
518 |
module='${XMODULE}', |
module='${XMODULE}', |
519 |
resolution='1024x768', |
resolution='1024x768', |
520 |
depth='16', |
depth='16', |
521 |
monitorid='0' |
refresh_rate='60' |
522 |
where serial=${ALX_SERIAL};" |
where serial=${ALX_SERIAL};" |
523 |
evaluate_retval |
evaluate_retval |
524 |
|
|
525 |
# input |
# input |
526 |
echo -e " Input settings ..." |
echo -e " Input settings ..." |
527 |
mysql_command ${SQL_USER} ${SQL_PASS} ${SQL_HOST} ${SQL_DB} \ |
mysqldo "update cfg_input set mouse='${XMOUSETYPE}' where serial=${ALX_SERIAL};" |
|
"update cfg_input set |
|
|
mouse='${XMOUSETYPE}' |
|
|
where serial=${ALX_SERIAL};" |
|
528 |
evaluate_retval |
evaluate_retval |
529 |
|
|
530 |
|
# version info |
531 |
|
local alx_os |
532 |
|
local alx_utils |
533 |
|
alx_os="$(< /etc/mageversion)" |
534 |
|
alx_utils="$(magequery -n alxconfig-ng-alx | sed 's:.*\[\ \(.*\)\ \].*:\1:')" |
535 |
|
alx_utils="${alx_utils/alxconfig-ng-alx-}" |
536 |
|
mysqldo "update client_version set os='${alx_os}', utils='${alx_utils}' where serial=${ALX_SERIAL};" |
537 |
} |
} |
538 |
|
|
539 |
# imports current settings to the local system resolved by the hardware detection |
# imports current settings to the local system resolved by the hardware detection |
563 |
#[ ! -d ${SETTINGSPATH} ] && install -d ${SETTINGSPATH} |
#[ ! -d ${SETTINGSPATH} ] && install -d ${SETTINGSPATH} |
564 |
#echo "${NETCARD_DRIVER}" > ${SETTINGSPATH}/modules |
#echo "${NETCARD_DRIVER}" > ${SETTINGSPATH}/modules |
565 |
|
|
566 |
# set an device alias for modprobe.conf |
# set an device alias for modprobe.conf and modules.conf |
567 |
[ ! -d /etc/modules.d ] && install -d /etc/modules.d |
[ ! -d /etc/modules.d ] && install -d /etc/modules.d |
568 |
|
[ ! -d /etc/modprobe.d ] && install -d /etc/modprobe.d |
569 |
echo "alias eth0 ${NETCARD_DRIVER}" > /etc/modules.d/net.eth0 |
echo "alias eth0 ${NETCARD_DRIVER}" > /etc/modules.d/net.eth0 |
570 |
|
echo "alias eth0 ${NETCARD_DRIVER}" > /etc/modprobe.d/net.eth0 |
571 |
|
|
572 |
# regenerate modprobe.conf |
# regenerate modprobe.conf |
573 |
[ -x $(which modules-update) ] && modules-update || echo "cannot regen modprobe.conf" |
[ -x $(which modules-update) ] && modules-update || echo "cannot regen modprobe.conf" |
577 |
# set system state to 'already configured' |
# set system state to 'already configured' |
578 |
touch /etc/alxconfig-ng/state/configured |
touch /etc/alxconfig-ng/state/configured |
579 |
|
|
580 |
|
# install slim desktopmanager configuration |
581 |
|
config_display_manager |
582 |
|
|
583 |
# if only an recheck was forced than abort now |
# if only an recheck was forced than abort now |
584 |
[[ ${ALX_FORCED_RECHECK} = true ]] && return 0 |
[[ ${ALX_FORCED_RECHECK} = true ]] && return 0 |
585 |
|
|
651 |
--icon-width "1" \ |
--icon-width "1" \ |
652 |
--icon-height "1" |
--icon-height "1" |
653 |
|
|
654 |
|
# create a xinitrc |
655 |
|
echo "exec startfluxbox" > ${ALX_UNPRIV_HOME}/.xinitrc |
656 |
|
|
657 |
# set correct permissions |
# set correct permissions |
658 |
chown ${ALX_UNPRIV_USER}:${ALX_UNPRIV_GROUP} ${ALX_UNPRIV_HOME} |
chown ${ALX_UNPRIV_USER}:${ALX_UNPRIV_GROUP} ${ALX_UNPRIV_HOME} |
659 |
chown ${ALX_UNPRIV_USER}:${ALX_UNPRIV_GROUP} ${ALX_UNPRIV_HOME}/.fluxbox |
chown ${ALX_UNPRIV_USER}:${ALX_UNPRIV_GROUP} ${ALX_UNPRIV_HOME}/.fluxbox |
660 |
chmod 0755 ${ALX_UNPRIV_HOME}/.fluxbox |
chmod 0755 ${ALX_UNPRIV_HOME}/.fluxbox |
661 |
chmod 0755 ${ALX_UNPRIV_HOME}/.xtdesktop |
chmod 0755 ${ALX_UNPRIV_HOME}/.xtdesktop |
662 |
chmod 0644 ${ALX_UNPRIV_HOME}/.xtdeskrc |
chmod 0644 ${ALX_UNPRIV_HOME}/.xtdeskrc |
663 |
|
chmod 0644 ${ALX_UNPRIV_HOME}/.xinitrc |
|
# default passwords are bad |
|
|
#usermod -p $(perl -e "printf(crypt('foobar','AD'))") root |
|
|
#usermod -p $(perl -e "printf(crypt('foobar','AD'))") ${ALX_UNPRIV_USER} |
|
|
#smbpasswd -a root foobar |
|
664 |
} |
} |
665 |
|
|
666 |
# start|stop |
# start|stop |
667 |
preliminary_network() |
preliminary_network() |
668 |
{ |
{ |
669 |
local module |
local module |
670 |
|
local modulesconf |
671 |
|
|
672 |
if [ -f /etc/alxconfig-ng/state/configured ] |
if [ -f /etc/alxconfig-ng/state/configured ] |
673 |
then |
then |
678 |
module=$(cat ${SETTINGSPATH}/modules) |
module=$(cat ${SETTINGSPATH}/modules) |
679 |
modprobe ${module} |
modprobe ${module} |
680 |
fi |
fi |
681 |
|
|
682 |
|
# check modprobe.conf |
683 |
|
if [[ $(kernel_major_version) = 2.4 ]] |
684 |
|
then |
685 |
|
modulesconf="/etc/modules.conf" |
686 |
|
else |
687 |
|
modulesconf="/etc/modprobe.conf" |
688 |
|
fi |
689 |
|
if [[ -z $(grep eth0 ${modulesconf}) ]] |
690 |
|
then |
691 |
|
modules-update force |
692 |
|
fi |
693 |
else |
else |
694 |
# vars used by hwdetect |
# vars used by hwdetect |
695 |
local NETCARD_FULLNAME NETCARD_DRIVER MOUSE_FULLNAME MOUSE_DEVICE SOUND_FULLNAME |
local NETCARD_FULLNAME NETCARD_DRIVER MOUSE_FULLNAME MOUSE_DEVICE SOUND_FULLNAME |
713 |
else |
else |
714 |
rm -f /var/run/dhcpcd-eth?.pid |
rm -f /var/run/dhcpcd-eth?.pid |
715 |
fi |
fi |
716 |
[[ ${ALX_CONFD_NETWORKING} = true ]] && ${rc_base}/init.d/network stop |
[[ ${ALX_CONFD_NETWORKING} = true ]] && [[ ${RUNLEVEL} != S ]] && \ |
717 |
|
${rc_base}/init.d/network stop |
718 |
|
|
719 |
echo -e ${COLMAGENTA}"Starting preliminary networking ... "${COLDEFAULT} |
echo -e ${COLMAGENTA}"Starting preliminary networking ... "${COLDEFAULT} |
720 |
|
|
742 |
if ps -A|grep dhcpcd > /dev/null |
if ps -A|grep dhcpcd > /dev/null |
743 |
then |
then |
744 |
dhcpcd -z &> /dev/null |
dhcpcd -z &> /dev/null |
745 |
|
sleep 1 |
746 |
fi |
fi |
747 |
evaluate_retval |
evaluate_retval |
748 |
;; |
;; |
780 |
rm -f /etc/alxconfig-ng/serial |
rm -f /etc/alxconfig-ng/serial |
781 |
rm -rf /etc/alxconfig-ng/state |
rm -rf /etc/alxconfig-ng/state |
782 |
|
|
783 |
|
# clear all printers & net-shares |
784 |
|
:> /etc/cups/printers.conf |
785 |
|
:> /etc/samba/smb.conf |
786 |
|
|
787 |
|
# remove inetd, cups & smb from init |
788 |
|
rc-config del inetd &> /dev/null |
789 |
|
rc-config del cups &> /dev/null |
790 |
|
rc-config del samba &> /dev/null |
791 |
|
|
792 |
|
# remove all user settings |
793 |
|
[ -d ${ALX_UNPRIV_HOME} ] && rm -rf ${ALX_UNPRIV_HOME} |
794 |
|
|
795 |
|
# remove all ica-sessions |
796 |
|
find ${ALX_ICA_SESSIONS} -type f -name '*.ica' | xargs rm |
797 |
|
|
798 |
|
# remove all old nics and modules configs |
799 |
|
find /etc/conf.d -type f -name 'net.*' | xargs rm |
800 |
|
find /etc/modules.d -type f -name 'net.*' | xargs rm |
801 |
|
|
802 |
|
# restore default networking |
803 |
|
cat ${ALX_SKELETONS}/net/net.eth0 > /etc/conf.d/net.eth0 |
804 |
|
|
805 |
echo "I am done now, press [Enter] to reboot system ..." |
echo "I am done now, press [Enter] to reboot system ..." |
806 |
read |
else |
807 |
reboot |
echo "Aborted, press [Enter] to reboot system ..." |
808 |
fi |
fi |
809 |
|
read |
810 |
|
reboot |
811 |
} |
} |
812 |
|
|
813 |
onboot_interface_list() |
onboot_interface_list() |
833 |
echo "${devices}" |
echo "${devices}" |
834 |
} |
} |
835 |
|
|
836 |
# read values from files |
# read values from net.* files |
837 |
read_value() |
read_value() |
838 |
{ |
{ |
839 |
local var="$1" |
local var="$1" |
920 |
|
|
921 |
# now setup system configuration |
# now setup system configuration |
922 |
# alx_setup_or_whatever_it_will_be_called() |
# alx_setup_or_whatever_it_will_be_called() |
923 |
[ "${ALX_HW_DETECT}" == "false" ] && update_system_settings |
[[ ${ALX_HW_DETECT} = false ]] && update_system_settings |
924 |
|
|
925 |
# stop at last the preliminary networking (dhcp) |
# stop at last the preliminary networking (dhcp) |
926 |
preliminary_network stop |
preliminary_network stop |