Files
TowerOptoSifAndSpectral/dpkg/postinst

35 lines
1.1 KiB
Plaintext
Raw Normal View History

2025-11-04 17:19:32 +08:00
#!/bin/sh
##安装完执行
echo "install airbornesystem ok"
sed -i '/\/root\/start/d' /etc/rc.local
sed -i '/^exit 0/i/root/start.sh &' /etc/rc.local
2025-11-27 18:50:16 +08:00
#sudo apt-get install -y timedatectl
2025-11-04 17:19:32 +08:00
timedatectl set-timezone Asia/Shanghai
date -R
2025-11-27 18:50:16 +08:00
sudo hwclock -w -f /dev/rtc1
2025-11-04 17:19:32 +08:00
#echo "/home/pi/AirbroneSystem/lib" > /etc/ld.so.conf.d/mylib.conf
#echo "/home/pi/AirbroneSystem/libreh" > /etc/ld.so.conf.d/mylib1.conf
## 获取系统内存信息,并提取总内存大小
#total_memory=$(free -m | awk 'NR==2{print $2}')
#
## 设置阈值3GB对应的是3072MB
#threshold=3072
#
## 判断总内存是否大于3GB
#if [ "$total_memory" -gt "$threshold" ]; then
# echo "Memory is greater than 3GB"
# rm /etc/udev/rules.d/12*
# echo 'ACTION=="add",KERNELS=="6-1:1.0",SUBSYSTEMS=="usb",MODE:="0777",SYMLINK+="ttySBGport"' > /etc/udev/rules.d/12-mybasem.rules
#else
# echo "Memory is not greater than 3GB Mybe M4B"
# rm /etc/udev/rules.d/12*
# echo 'ACTION=="add",KERNELS=="3-1:1.0",SUBSYSTEMS=="usb",MODE:="0777",SYMLINK+="ttySBGport"' > /etc/udev/rules.d/12-mybasem4b.rules
#
#fi
#
#
#
#
# ldconfig
#