Skip to content

Commit

Permalink
补丁
Browse files Browse the repository at this point in the history
  • Loading branch information
lmliheng committed Jun 20, 2024
1 parent 7a5144c commit d82c6e3
Show file tree
Hide file tree
Showing 13 changed files with 8 additions and 6 deletions.
Binary file modified lib/libprintcolor.a
Binary file not shown.
Binary file modified objs/ExamAll.o
Binary file not shown.
Binary file added objs/FileSize.o
Binary file not shown.
Binary file modified objs/Version.o
Binary file not shown.
Binary file modified objs/bootstrap.o
Binary file not shown.
Binary file modified objs/cmd_utils.o
Binary file not shown.
Binary file modified objs/install_utils.o
Binary file not shown.
Binary file modified objs/shell_utils.o
Binary file not shown.
Binary file added objs/sl.o
Binary file not shown.
5 changes: 3 additions & 2 deletions src/LoginShell/ExamAll.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@
void login_scripts(const char *script){
if (strcmp(script, "exam") == 0){
system("curl -O https://heng1.oss-cn-beijing.aliyuncs.com/systeminfo.sh && cp systeminfo.sh /etc/profile.d/ && chmod +x /etc/profile.d/systeminfo.sh");
printf("\033[1;34m成功设置登录自动检查系统信息,可自行扩展脚本\033[0m\n");
color_printf(cyan,"成功设置登录自动检查系统信息,可自行扩展脚本\n");
system("rm -f systeminfo.sh");
}
else {
color_printf(cyan,"CmdUtils的登录自动化执行功能暂不支持该参数\n");
color_printf(red,"CmdUtils的登录自动化执行功能暂不支持该参数\n");
}

}
2 changes: 1 addition & 1 deletion src/Utils/Version.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ void print_version(const char *script){
if (strcmp(script, "version") == 0){


char version[] = "3.0.1";
char version[] = "3.20";

// 使用printf函数打印版本号
printf("当前版本是: %s\n", version);
Expand Down
2 changes: 1 addition & 1 deletion src/Utils/cmd_utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,6 @@ void show_command_usage(const char *command) {
}else if (strcmp(command, "sl") == 0) { // 增加的sl命令

}else {
color_printf(cyan,"CmdUtils的提示功能暂不支持命令\n");
color_printf(red,"CmdUtils的提示功能暂不支持命令\n");
}
}
5 changes: 3 additions & 2 deletions src/Utils/shell_utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ void shell_scripts(const char *script){
if (strcmp(script, "env") == 0){
system("env");
}else if(strcmp(script, "banner") == 0){
system("vim /etc/motd");
system("");
}else if(strcmp(script, "exam") == 0){
system("cat /etc/os-release");
system("curl -O https://heng1.oss-cn-beijing.aliyuncs.com/systeminfo.sh && cp systeminfo.sh /etc/profile.d/ && chmod +x /etc/profile.d/systeminfo.sh");
system("rm -f systeminfo.sh");
}else if(strcmp(script, "cpu") == 0){
system("lscpu");
}else if(strcmp(script, "free") == 0){
Expand Down

0 comments on commit d82c6e3

Please sign in to comment.