first commit

This commit is contained in:
zj
2025-12-28 15:15:19 +08:00
commit 42d43f7342
606 changed files with 14592 additions and 0 deletions

View File

@@ -0,0 +1,44 @@
#!/usr/bin/env bash
script_cmdline() {
local param
for param in $(</proc/cmdline); do
case "${param}" in
script=*)
echo "${param#*=}"
return 0
;;
esac
done
}
automated_script() {
local script rt
script="$(script_cmdline)"
if [[ -n "${script}" && ! -x /tmp/startup_script ]]; then
if [[ "${script}" =~ ^((http|https|ftp|tftp)://) ]]; then
# there's no synchronization for network availability before executing this script
printf '%s: waiting for network-online.target\n' "$0"
until systemctl --quiet is-active network-online.target; do
sleep 1
done
printf '%s: downloading %s\n' "$0" "${script}"
curl "${script}" --location --retry-connrefused --retry 10 --fail -s -o /tmp/startup_script
rt=$?
else
cp "${script}" /tmp/startup_script
rt=$?
fi
if [[ ${rt} -eq 0 ]]; then
chmod +x /tmp/startup_script
printf '%s: executing automated script\n' "$0"
# note that script is executed when other services (like pacman-init) may be still in progress, please
# synchronize to "systemctl is-system-running --wait" when your script depends on other services
/tmp/startup_script
fi
fi
}
if [[ $(tty) == "/dev/tty1" ]]; then
automated_script
fi

96
archiso/airootfs/root/.bashrc Executable file
View File

@@ -0,0 +1,96 @@
#
# ~/.bashrc
#
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
# 基础别名
alias ls='ls --color=auto'
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'
alias grep='grep --color=auto'
# 安全操作
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
# 导航别名
alias ..='cd ..'
alias ...='cd ../..'
alias ....='cd ../../..'
# 系统信息
alias df='df -h'
alias du='du -h'
alias dus='du -sh * | sort -nr'
alias free='free -h'
# Git 快捷方式
alias gs='git status'
alias ga='git add'
alias gc='git commit'
alias gp='git push'
alias gl='git log --oneline'
alias tms='sh /home/smart/.tms3/starter/tms-tools.sh'
alias rtms='sh /home/smart/.tms3/starter/restart'
# 文件大小查看别名
alias size='ls -lahSr' # 简单版本
alias sizes='du -sh * | sort -h' # 准确版本
alias sizeall='du -sh .[!.]* * 2>/dev/null | sort -h' # 包含隐藏文件
# 详细版本,显示文件权限和大小
alias sizedetail='du -sh * | sort -h | while read s n; do ls -ld "$n" | awk '\''{printf "%-10s %-5s %-8s ", $1, $3, $4}'\''; echo "$s $n"; done'
# 文件大小查看函数
fsize() {
local path="${1:-.}" # 默认当前目录
local depth="${2:-0}" # 目录深度
echo "=== 文件大小统计: $path ==="
if [ "$depth" -eq 0 ]; then
# 只显示当前目录下的文件
du -sh "$path"/* 2>/dev/null | sort -h
else
# 显示指定深度的目录结构
find "$path" -maxdepth "$depth" -type f -exec du -sh {} + 2>/dev/null | sort -h
fi
}
# 快捷别名
alias sz='fsize . 0'
alias sz1='fsize . 1'
alias sz2='fsize . 2'
# 环境变量
export EDITOR=vim
export VISUAL=vim
export HISTSIZE=10000
export HISTFILESIZE=20000
# Wine 环境变量 - 添加到 PATH
export WINE_HOME="/home/smart/wine"
export PATH="$WINE_HOME/bin:$PATH"
# 彩色提示符
PS1='\[\033[01;33m\]\t\[\033[00m\] \[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
# 实用函数
mkcd() { mkdir -p "$1" && cd "$1"; }
findf() { find . -name "$1" -type f 2>/dev/null; }
# 检查 wine 是否可用
wine-check() {
if command -v wine >/dev/null 2>&1; then
echo "✓ Wine is available: $(which wine)"
wine --version
else
echo "✗ Wine not found in PATH"
echo "Current PATH: $PATH"
fi
}

View File

@@ -0,0 +1,4 @@
disable-ccid
disable-pinpad
pcsc-driver /usr/lib/libpcsclite.so
pcsc-shared

6
archiso/airootfs/root/.zlogin Executable file
View File

@@ -0,0 +1,6 @@
# fix for screen readers
if grep -Fqa 'accessibility=' /proc/cmdline &> /dev/null; then
setopt SINGLE_LINE_ZLE
fi
~/.automated_script.sh

Binary file not shown.

View File

@@ -0,0 +1,30 @@
bbt tms 自定义镜像
系统安装后,就是所有软件安装好的状态,所有软件都预安装了
镜像内置软件
- DCC2
- DCCS2
- communicator
- commander
- teamviewer
- 向日葵
- todesk
- dcp-o-matic
- firefox
- remmina
- tms
一般只需要配置网络恢复数据升级tms就可以使用
系统安装后第一次开机,网络自动开启连接
主机名在安装后,就已经自动设置好了
tv 密码已经默认设置
所有需要的软件都已设置开机自启动
vnc软件换成 remmina 软件了,同时支持 vnc 和rdp 协议方便连接imax 主机
屏保 锁屏 都已经关闭
火狐主页已经默认配置tms
安装启动U盘 同时为live环境支持远程方便系统损坏修复或者其他备份操作