- while read -r line
- do
- case $line in
- isolated_cores=1-$MAXCOREID*)
- echo "Isolated CPU(s) OK, no reboot: $line">>$logfile
- modprobe uio
- insmod /root/dpdk/build/kmod/igb_uio.ko
- exit 0
- ;;
- isolated_cores=*)
- echo "Isolated CPU(s) NOK, change the config and reboot: $line">>$logfile
- sed -i "/^isolated_cores=.*/c\isolated_cores=1-$MAXCOREID" $filename
- tuned-adm profile realtime-virtual-guest
- reboot
- exit 0
- ;;
- *)
- echo "$line"
- ;;
- esac
- done < "$filename"
- echo "isolated_cores=1-$MAXCOREID" >> $filename
- echo "No Isolated CPU(s) defined in config, line added: $line">>$logfile
- tuned-adm profile realtime-virtual-guest
- reboot
+ while read -r line
+ do
+ case $line in
+ isolated_cores=1-$MAXCOREID*)
+ echo "Isolated CPU(s) OK, no reboot: $line">>$logfile
+ FILE=/opt/rapid/after_boot.sh
+ if test -f "$FILE"; then
+ ("$FILE")
+ echo "Executing: $FILE">>$logfile
+ fi
+ touch /opt/rapid/system_ready_for_rapid
+ exit 0
+ ;;
+ isolated_cores=*)
+ echo "Isolated CPU(s) NOK, change the config and reboot: $line">>$logfile
+ sed -i "/^isolated_cores=.*/c\isolated_cores=1-$MAXCOREID" $filename
+ tuned-adm profile realtime-virtual-guest
+ reboot
+ exit 0
+ ;;
+ *)
+ echo "$line"
+ ;;
+ esac
+ done < "$filename"
+ echo "isolated_cores=1-$MAXCOREID" >> $filename
+ echo "No Isolated CPU(s) defined in config, line added: $line">>$logfile
+ tuned-adm profile realtime-virtual-guest
+ reboot