Skip to content

Commit dff7b24

Browse files
committed
update
1 parent cb4b34a commit dff7b24

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

docs/blog/2025/995-0725-CaddyWebServer-YYDS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Caddy 的配置文件使用的是 Caddyfile 格式,语法非常简洁明了。
2828

2929
以下是我使用 Caddyfile 配置的示例:
3030

31-
```caddyfile
31+
```bash
3232

3333
mikigo.site {
3434

docs/program/autotest/UI自动化/智能化功能测试.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# Date :2021/08/20
88
```
99

10-
仓库地址:[https://gitlabcd.uniontech.com/autotest/cd-desktop-aitest](ttps://gitlabcd.uniontech.com/autotest/cd-desktop-aitest)
10+
仓库地址:[https://gitlabcd.uniontech.com/autotest/cd-desktop-aitest](https://gitlabcd.uniontech.com/autotest/cd-desktop-aitest)
1111

1212
## 一、方案概述
1313

docs/program/tech_doc/根因分析/rootfs进入MATE桌面后打开终端不能执行reboot指令根因分析.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Author: 禄烨
77

88
## 一、相关术语
99

10-
<center style="color:#C0C0C0;text-decoration">表1 相关术语</center>
10+
表1 相关术语
1111

1212
| 全称 | 缩写 | 描述 |
1313
| --------------- | ------ | ------------------------------------------------------------ |
@@ -55,7 +55,7 @@ Author: 禄烨
5555

5656
![](/data/图1 问题现象.png)
5757

58-
<center style="color:#C0C0C0;text-decoration">图1 问题现象</center>
58+
图1 问题现象
5959

6060
6、期望
6161

@@ -86,7 +86,7 @@ uos@uos:~$ echo $PATH
8686

8787
​ 查阅资料,了解到linux系统环境变量区分三类变量配置。见表2:
8888

89-
<center style="color:#C0C0C0;text-decoration">表2 环境变量说明</center>
89+
表2 环境变量说明
9090

9191
| 类型 | 配置文件 | 作用域 |
9292
| :------: | ------------ | :----------------------------------------------------------- |
@@ -104,7 +104,7 @@ A( /etc/profile ) --> B[ $HOME/.profile ]
104104
B[ $HOME/.profile ] --> C[ $HOME/.bashrc ]
105105
```
106106

107-
<center style="color:#C0C0C0;text-decoration">图2 环境变量加载流程</center>
107+
图2 环境变量加载流程
108108

109109
​ 了解环境变量配置文件加载顺序后,按照加载顺序检查环境变量配置对于PATH的定义是否有缺失,查看`/etc/profile`对全局环境变量的配置代码如下:
110110

@@ -163,11 +163,11 @@ fi
163163

164164
![](/data/图3 调试详情.png)
165165

166-
<center style="color:#C0C0C0;text-decoration">图3 调试详情</center>
166+
图3 调试详情
167167

168168
​ 阅读bash man手册以及shell相关资料,得知直接启动终端执行命令的方式为非登录式(no-login shell)、交互式(interactive shell)行为。如表3 shell启动方式介绍,该行为下不会去运行任何profile和rc文件,只有登录式(login shell)会在登录时自动执行`/etc/profile``~/.profile`文件。从此处分析,无法使用reboot等命令属于正常情况。
169169

170-
<center style="color:#C0C0C0;text-decoration">表3 shell启动方式</center>
170+
表3 shell启动方式
171171

172172
| 启动方式 | 说明 |
173173
| --------------------------------- | ------------------------------------------------------------ |
@@ -205,7 +205,7 @@ PATH=$PATH:/sbin:/usr/sbin
205205

206206
![](/data/图4 手动补全环境变量.png)
207207

208-
<center style="color:#C0C0C0;text-decoration">图4 手动补全环境变量</center>
208+
图4 手动补全环境变量
209209

210210
追加环境变量后,执行reboot命令,系统响应重启。
211211

@@ -227,13 +227,13 @@ export PATH
227227

228228
![](/data/图5 自动加载环境变量-1.png)
229229

230-
<center style="color:#C0C0C0;text-decoration">图5 自动加载环境变量-1</center>
230+
图5 自动加载环境变量-1
231231

232232
​ 继续边缘验证,该方式虽然可以解决此问题,但是存在不足,当在同一个终端中再次登录一个用户或者以登录方式打开shell,由于系统会自动先加载/etc/profile,然后再加载/etc/bash.bashrc ,所以导致变量值重复。如图6:
233233

234234
![](/data/图6 自动加载环境变量-2.png)
235235

236-
<center style="color:#C0C0C0;text-decoration">图6 自动加载环境变量-2</center>
236+
图6 自动加载环境变量-2
237237

238238
239239

@@ -291,7 +291,7 @@ fi
291291

292292
​ 对比两种解决方案,如表4所示,列出了两种方案的优缺点:
293293

294-
<center style="color:#C0C0C0;text-decoration">表4 解决方案对比</center>
294+
表4 解决方案对比
295295

296296
| 序号 | 方案 | 优点 | 缺点 |
297297
| ---- | ------------------------------- | ------------------------------------------------------------ | ------------------------------------------------------------ |

0 commit comments

Comments
 (0)