|
|
|
@ -134,12 +134,24 @@ setup_alsautils() {
|
|
|
|
|
fi
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
restore_filecaps() {
|
|
|
|
|
if [[ -f /var/lib/calculate/filecaps ]] && type filecap &>/dev/null
|
|
|
|
|
then
|
|
|
|
|
while read line;
|
|
|
|
|
do
|
|
|
|
|
filecap $line
|
|
|
|
|
done </var/lib/calculate/filecaps
|
|
|
|
|
fi
|
|
|
|
|
rm -f /var/lib/calculate/filecaps
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
start() {
|
|
|
|
|
if rc-config list boot | grep -q -e "calculate " -e "calculate$"
|
|
|
|
|
then
|
|
|
|
|
local roottype=`variable_value main.os_root_type`
|
|
|
|
|
local subsystem=`variable_value main.os_subsystem`
|
|
|
|
|
local rootflash=`variable_value main.os_root_flash_dev`
|
|
|
|
|
[[ $subsystem == "lxc" ]] && restore_filecaps
|
|
|
|
|
if [[ $roottype != "livecd" ]] || grep "video:nvidia" /proc/cmdline &>/dev/null
|
|
|
|
|
then
|
|
|
|
|
install_video_driver
|
|
|
|
@ -155,20 +167,17 @@ start() {
|
|
|
|
|
LANG=C configure_users
|
|
|
|
|
[[ -n $rootflash ]] && mount -o remount,rw $rootflash
|
|
|
|
|
|
|
|
|
|
rc-update del calculate boot
|
|
|
|
|
|
|
|
|
|
# reinit net.* services
|
|
|
|
|
local rootdev=`variable_value main.os_root_dev`
|
|
|
|
|
if [[ $roottype == "livecd" ]] || [[ $subsystem == "lxc" ]]
|
|
|
|
|
if [[ $roottype == "livecd" ]] && [[ $rootdev == "/dev/nfs" ]]
|
|
|
|
|
then
|
|
|
|
|
if [[ $rootdev == "/dev/nfs" ]]
|
|
|
|
|
then
|
|
|
|
|
touch /* /bin/* /sbin/*
|
|
|
|
|
fi
|
|
|
|
|
udevadm trigger --action="add" --subsystem-match=net
|
|
|
|
|
/sbin/rc-update --update
|
|
|
|
|
touch /* /bin/* /sbin/*
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
rc-update del calculate boot
|
|
|
|
|
/sbin/rc-update --update
|
|
|
|
|
udevadm trigger --action="add" --subsystem-match=net
|
|
|
|
|
|
|
|
|
|
if ! [[ -f /var/calculate/server/ca/server.key ]]
|
|
|
|
|
then
|
|
|
|
|
LANG=C /usr/sbin/cl-core --bootstrap
|
|
|
|
|