Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a919f895da | |||
| b4614e607c | |||
| 92550fa37c | |||
| 566fec3880 | |||
| c16a842e65 | |||
| e98c975d2b | |||
| 5d09e523aa | |||
| 6fe36a9aad | |||
| bcc08707b9 | |||
| 5f078f0027 |
@@ -76,6 +76,10 @@ LocalFileSigLevel = Optional
|
||||
#[core-testing]
|
||||
#Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
[custom]
|
||||
SigLevel = Optional TrustAll
|
||||
Server = http://git.yuyujing.cn/zj/custompkgs/raw/x86_64
|
||||
|
||||
[core]
|
||||
Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
@@ -100,6 +104,4 @@ Include = /etc/pacman.d/mirrorlist
|
||||
#SigLevel = Optional TrustAll
|
||||
#Server = file:///home/custompkgs
|
||||
|
||||
[custom]
|
||||
SigLevel = Optional TrustAll
|
||||
Server = http://git.yuyujing.cn/zj/custompkgs/raw/x86_64
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
CentOS Linux release 8.5.2111
|
||||
Arch Linux release 25.12
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
# Allow root login using password authentication
|
||||
PasswordAuthentication yes
|
||||
PermitRootLogin yes
|
||||
PermitRootLogin no
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
/etc/systemd/system/smarttms.service
|
||||
@@ -1 +0,0 @@
|
||||
/usr/lib/systemd/system/sshd.service
|
||||
19
archiso/airootfs/etc/systemd/system/smarttms.service
Executable file
19
archiso/airootfs/etc/systemd/system/smarttms.service
Executable file
@@ -0,0 +1,19 @@
|
||||
[Unit]
|
||||
Description=SmartTMS Service
|
||||
After=mysqld.service
|
||||
Wants=mysqld.service
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
User=root
|
||||
ExecStart=/usr/bin/smarttms start
|
||||
ExecStop=/usr/bin/smarttms stop
|
||||
ExecReload=/bin/kill -HUP $MAINPID
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
TimeoutStartSec=300
|
||||
TimeoutStopSec=300
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
/home/smart/.config/systemd/user/smarttms.service
|
||||
@@ -1,22 +0,0 @@
|
||||
[Unit]
|
||||
Description=SmartTMS Service (User)
|
||||
After=mysqld.service graphical.target
|
||||
Wants=mysqld.service
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
ExecStart=sudo /usr/bin/smarttms start
|
||||
ExecStop=sudo /usr/bin/smarttms stop
|
||||
ExecReload=sudo /usr/bin/smarttms restart
|
||||
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
TimeoutStartSec=300
|
||||
TimeoutStopSec=300
|
||||
|
||||
Environment="DISPLAY=:0"
|
||||
Environment="XAUTHORITY=/home/smart/.Xauthority"
|
||||
Environment="XDG_CURRENT_DESKTOP=XFCE"
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
35
archiso/airootfs/home/smart/smart-organizer-service-install.sh
Executable file → Normal file
35
archiso/airootfs/home/smart/smart-organizer-service-install.sh
Executable file → Normal file
@@ -4,8 +4,9 @@ SOFT_PATH="/home/smart"
|
||||
SOFT_NAME="SmartOrganizer"
|
||||
SERVICE_SCRIPT="SOService"
|
||||
SERVICE_NAME="SOS"
|
||||
|
||||
wget -q --no-check-certificate "https://bbt-static-a.oss-cn-beijing.aliyuncs.com/smart/organizer/${SOFT_NAME}.zip" -O ${SOFT_PATH}/${SOFT_NAME}.zip
|
||||
#https://bbt-static-beta.oss-cn-beijing.aliyuncs.com/smart/organizer/SmartOrganizer.zip
|
||||
wget -q --no-check-certificate "https://bbt-static-beta.oss-cn-beijing.aliyuncs.com/smart/organizer/SmartOrganizer.zip" -O ${SOFT_PATH}/${SOFT_NAME}.zip
|
||||
#cp -r -f /home/smart/install8.5/SmartOrganizer /home/smart/
|
||||
|
||||
if [[ -z ${SOFT_PATH}/${SOFT_NAME}.zip ]]; then
|
||||
echo "Download failed!"
|
||||
@@ -67,9 +68,27 @@ if [[ $(getSystemVersion) -eq 6 ]]; then
|
||||
service SOS start
|
||||
else
|
||||
echo "current system version is > 6"
|
||||
systemctl stop ${SERVICE_NAME}
|
||||
systemctl disable ${SERVICE_NAME}
|
||||
rm -f /usr/lib/systemd/system/${SERVICE_NAME}.service
|
||||
systemctl enable ${SERVICE_NAME}
|
||||
systemctl start ${SERVICE_NAME}
|
||||
fi
|
||||
systemctl stop ${SERVICE_SCRIPT}
|
||||
systemctl disable ${SERVICE_SCRIPT}
|
||||
rm -f /usr/lib/systemd/system/${SERVICE_SCRIPT}.service
|
||||
|
||||
cat > /usr/lib/systemd/system/${SERVICE_SCRIPT}.service <<EOF
|
||||
[Unit]
|
||||
Description=SOService
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
Restart=on-failure
|
||||
RestartSec=5s
|
||||
ExecStart=/bin/bash /home/smart/SmartOrganizer/SOService start
|
||||
ExecStop=/bin/bash /home/smart/SmartOrganizer/SOService stop
|
||||
ExecRestart=/bin/bash /home/smart/SmartOrganizer/SOService restart
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl daemon-reload
|
||||
|
||||
systemctl enable ${SERVICE_SCRIPT}
|
||||
systemctl start ${SERVICE_SCRIPT}
|
||||
fi
|
||||
|
||||
24
archiso/airootfs/root/customize_airootfs.sh
Executable file
24
archiso/airootfs/root/customize_airootfs.sh
Executable file
@@ -0,0 +1,24 @@
|
||||
#!/bin/bash
|
||||
|
||||
# 更新 pacman 数据库,确保能找到本地仓库的包
|
||||
pacman -Sy
|
||||
|
||||
# 安装本地仓库的 linux 和 linux-headers
|
||||
# 由于 [custom] 仓库优先级最高,pacman 会从这里安装
|
||||
pacman -S --noconfirm linux linux-headers
|
||||
|
||||
# 重新生成 initramfs,确保新内核能启动
|
||||
# 这通常在安装内核时由 pacman 自动处理,但手动安装后最好确认一下
|
||||
mkinitcpio -P
|
||||
|
||||
# 清理 pacman 缓存
|
||||
pacman -Scc --noconfirm
|
||||
|
||||
# 删除本地仓库的数据库文件,避免在最终系统上占用空间
|
||||
# rm -rf /localrepo/custom.db.tar.gz /localrepo/custom.files.tar.gz
|
||||
# rm -rf /localrepo/*.pkg.tar.zst
|
||||
# rmdir /localrepo
|
||||
|
||||
# 如果你希望在安装完成后移除本地仓库的定义,可以编辑 pacman.conf
|
||||
# 但对于 livecd 或安装介质,通常不需要这样做,因为它是临时环境
|
||||
# sed -i '/^\[custom\]/,/^Server = file:\/\/\/localrepo/d' /etc/pacman.conf
|
||||
@@ -3,6 +3,8 @@ Description=SOService
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
Restart=on-failure
|
||||
RestartSec=5s
|
||||
|
||||
ExecStart=/bin/bash /home/smart/SmartOrganizer/SOService start
|
||||
ExecStop=/bin/bash /home/smart/SmartOrganizer/SOService stop
|
||||
|
||||
@@ -247,6 +247,7 @@ xfce4-verve-plugin
|
||||
xfce4-wavelan-plugin
|
||||
xfce4-whiskermenu-plugin
|
||||
xfce4-xkb-plugin
|
||||
xfce4-pulseaudio-plugin
|
||||
|
||||
git
|
||||
|
||||
|
||||
@@ -109,9 +109,16 @@ LocalFileSigLevel = Optional
|
||||
#[core-testing]
|
||||
#Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
[custom]
|
||||
SigLevel = Optional TrustAll
|
||||
#Server = http://yuyujing.cn/data/sh/custompkgs/x86_64/
|
||||
#Server = http://192.168.10.207:3000/zj/custompkgs/raw/x86_64/
|
||||
Server = http://git.yuyujing.cn/zj/custompkgs/raw/x86_64/
|
||||
|
||||
[core]
|
||||
Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
|
||||
#[extra-testing]
|
||||
#Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
@@ -132,11 +139,7 @@ Include = /etc/pacman.d/mirrorlist
|
||||
#[custom]
|
||||
#SigLevel = Optional TrustAll
|
||||
#Server = file:///home/custompkgs
|
||||
[custom]
|
||||
SigLevel = Optional TrustAll
|
||||
#Server = http://yuyujing.cn/data/sh/custompkgs/x86_64/
|
||||
#Server = http://192.168.10.207:3000/zj/custompkgs/raw/x86_64/
|
||||
Server = http://git.yuyujing.cn/zj/custompkgs/raw/x86_64/
|
||||
|
||||
|
||||
#more repositories here :
|
||||
#https://wiki.archlinux.org/index.php/unofficial_user_repositories
|
||||
|
||||
@@ -5,7 +5,7 @@ iso_name="BBTTMS"
|
||||
iso_label="BBTTMS_$(date --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y%m)"
|
||||
iso_publisher="BBTTMS <https://yuyujing.cn>"
|
||||
iso_application="BBTTMS Arch Linux Live/Rescue/Install DVD"
|
||||
iso_version="BBTTMS_$(date --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y.%m.%d)"
|
||||
iso_version="TMS_$(date --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y.%m.%d)"
|
||||
install_dir="BBTTMS"
|
||||
buildmodes=('iso')
|
||||
bootmodes=('bios.syslinux.mbr' 'bios.syslinux.eltorito'
|
||||
@@ -59,4 +59,5 @@ file_permissions=(
|
||||
["/home/smart/smart-organizer-service-install.sh"]="1000:1000:755"
|
||||
["/usr/local/java/"]="0:0:755"
|
||||
["/etc/redhat-release"]="0:0:644"
|
||||
["/root/customize_airootfs.sh"]="0:0:755"
|
||||
)
|
||||
|
||||
@@ -16,6 +16,16 @@
|
||||
#
|
||||
##################################################################################################################
|
||||
|
||||
# 获取脚本所在的目录
|
||||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
|
||||
# 假设 archiso.md 和 archiso 目录在脚本目录的上一级
|
||||
PROJECT_ROOT="$( dirname "$SCRIPT_DIR" )"
|
||||
|
||||
# 导出这些变量,以便脚本后续使用
|
||||
export SCRIPT_DIR
|
||||
export PROJECT_ROOT
|
||||
|
||||
|
||||
if lsblk -f | grep btrfs > /dev/null 2>&1 ; then
|
||||
echo
|
||||
echo "################################################################## "
|
||||
@@ -131,7 +141,8 @@ echo
|
||||
|
||||
echo
|
||||
echo "Saving current archiso version to archiso.md"
|
||||
sudo sed -i "s/\(^archiso-version=\).*/\1$archisoVersion/" ../archiso.md
|
||||
#sudo sed -i "s/\(^archiso-version=\).*/\1$archisoVersion/" ../archiso.md
|
||||
sudo sed -i "s/\(^archiso-version=\).*/\1$archisoVersion/" "$PROJECT_ROOT/archiso.md"
|
||||
echo
|
||||
echo "Making mkarchiso verbose"
|
||||
sudo sed -i 's/quiet="y"/quiet="n"/g' /usr/bin/mkarchiso
|
||||
@@ -152,7 +163,8 @@ echo
|
||||
echo "Copying the Archiso folder to build work"
|
||||
echo
|
||||
mkdir $buildFolder
|
||||
cp -r ../archiso $buildFolder/archiso
|
||||
#cp -r ../archiso $buildFolder/archiso
|
||||
cp -r "$PROJECT_ROOT/archiso" "$buildFolder/archiso"
|
||||
|
||||
# echo
|
||||
# echo "################################################################## "
|
||||
|
||||
Reference in New Issue
Block a user