mirror of
https://github.com/RubyMetric/chsrc
synced 2025-06-16 00:16:59 +08:00
Split openbsd out
This commit is contained in:
parent
c96323c6bd
commit
ccaf8d2b33
@ -370,21 +370,6 @@ os_netbsd_sources[] = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @time 2023-09-02 更新
|
|
||||||
* @note 源并不完整,且未经测试是否有效
|
|
||||||
*/
|
|
||||||
os_openbsd_sources[] = {
|
|
||||||
{&Upstream, NULL},
|
|
||||||
{&Ali, "https://mirrors.aliyun.com/OpenBSD/"},
|
|
||||||
{&Bfsu, "https://mirrors.bfsu.edu.cn/OpenBSD/"},
|
|
||||||
{&Ustc, "https://mirrors.ustc.edu.cn/OpenBSD/"},
|
|
||||||
{&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/OpenBSD/"},
|
|
||||||
{&Tencent, "https://mirrors.tencent.com/OpenBSD/"},
|
|
||||||
{&Netease, "https://mirrors.163.com/OpenBSD/"},
|
|
||||||
{&Sohu, "https://mirrors.sohu.com/OpenBSD/"}
|
|
||||||
},
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @time 2023-09-06 更新
|
* @time 2023-09-06 更新
|
||||||
@ -559,7 +544,7 @@ def_sources_n(os_rocky); def_sources_n(os_alma);
|
|||||||
def_sources_n(os_linuxlite); def_sources_n(os_raspberrypi);
|
def_sources_n(os_linuxlite); def_sources_n(os_raspberrypi);
|
||||||
def_sources_n(os_armbian);
|
def_sources_n(os_armbian);
|
||||||
|
|
||||||
def_sources_n(os_freebsd); def_sources_n(os_netbsd); def_sources_n(os_openbsd);
|
def_sources_n(os_freebsd); def_sources_n(os_netbsd);
|
||||||
|
|
||||||
def_sources_n(os_ros);
|
def_sources_n(os_ros);
|
||||||
|
|
||||||
|
28
src/chsrc.c
28
src/chsrc.c
@ -898,33 +898,7 @@ os_netbsd_setsrc (char *option)
|
|||||||
chsrc_say_lastly (&source, ChsrcTypeUntested);
|
chsrc_say_lastly (&source, ChsrcTypeUntested);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#include "recipe/os/openbsd.c"
|
||||||
|
|
||||||
void
|
|
||||||
os_openbsd_getsrc (char *option)
|
|
||||||
{
|
|
||||||
chsrc_view_file ("/etc/installurl");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 参考:
|
|
||||||
* 1. https://mirrors.tuna.tsinghua.edu.cn/help/openbsd/
|
|
||||||
* 2. https://book.bsdcn.org/di-26-zhang-openbsd/di-26.2-jie-pei-zhi.html
|
|
||||||
*/
|
|
||||||
void
|
|
||||||
os_openbsd_setsrc (char *option)
|
|
||||||
{
|
|
||||||
chsrc_ensure_root ();
|
|
||||||
|
|
||||||
SourceInfo source;
|
|
||||||
chsrc_yield_source (os_openbsd);
|
|
||||||
chsrc_confirm_source (&source);
|
|
||||||
|
|
||||||
chsrc_backup ("/etc/installurl");
|
|
||||||
chsrc_overwrite_file (source.url, "/etc/installurl");
|
|
||||||
|
|
||||||
chsrc_say_lastly (&source, ChsrcTypeUntested);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 参考:
|
* 参考:
|
||||||
|
@ -41,7 +41,7 @@ static const char
|
|||||||
|
|
||||||
def_target(os_ubuntu); def_target(os_mint); def_target(os_debian); def_target(os_kali);
|
def_target(os_ubuntu); def_target(os_mint); def_target(os_debian); def_target(os_kali);
|
||||||
def_target(os_linuxlite);
|
def_target(os_linuxlite);
|
||||||
def_target(os_netbsd); def_target(os_openbsd);
|
def_target(os_netbsd);
|
||||||
def_target(os_deepin); def_target(os_openkylin);
|
def_target(os_deepin); def_target(os_openkylin);
|
||||||
def_target(os_raspberrypi);
|
def_target(os_raspberrypi);
|
||||||
def_target(os_armbian);
|
def_target(os_armbian);
|
||||||
|
54
src/recipe/os/openbsd.c
Normal file
54
src/recipe/os/openbsd.c
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
/** ------------------------------------------------------------
|
||||||
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
* -------------------------------------------------------------
|
||||||
|
* File Authors : Heng Guo <2085471348@qq.com>
|
||||||
|
* | Aoran Zeng <ccmywish@qq.com>
|
||||||
|
* Contributors : Nil Null <nil@null.org>
|
||||||
|
* Created On : <2023-09-03>
|
||||||
|
* Last Modified : <2024-08-16>
|
||||||
|
* ------------------------------------------------------------*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @time 2023-09-02 更新
|
||||||
|
*/
|
||||||
|
static SourceInfo
|
||||||
|
os_openbsd_sources[] = {
|
||||||
|
{&Upstream, NULL},
|
||||||
|
{&Ali, "https://mirrors.aliyun.com/OpenBSD/"},
|
||||||
|
{&Bfsu, "https://mirrors.bfsu.edu.cn/OpenBSD/"},
|
||||||
|
{&Ustc, "https://mirrors.ustc.edu.cn/OpenBSD/"},
|
||||||
|
{&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/OpenBSD/"},
|
||||||
|
{&Tencent, "https://mirrors.tencent.com/OpenBSD/"},
|
||||||
|
{&Netease, "https://mirrors.163.com/OpenBSD/"},
|
||||||
|
{&Sohu, "https://mirrors.sohu.com/OpenBSD/"}
|
||||||
|
};
|
||||||
|
def_sources_n(os_openbsd);
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
os_openbsd_getsrc (char *option)
|
||||||
|
{
|
||||||
|
chsrc_view_file ("/etc/installurl");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 参考:
|
||||||
|
* 1. https://mirrors.tuna.tsinghua.edu.cn/help/openbsd/
|
||||||
|
* 2. https://book.bsdcn.org/di-26-zhang-openbsd/di-26.2-jie-pei-zhi.html
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
os_openbsd_setsrc (char *option)
|
||||||
|
{
|
||||||
|
chsrc_ensure_root ();
|
||||||
|
|
||||||
|
SourceInfo source;
|
||||||
|
chsrc_yield_source (os_openbsd);
|
||||||
|
chsrc_confirm_source (&source);
|
||||||
|
|
||||||
|
chsrc_backup ("/etc/installurl");
|
||||||
|
chsrc_overwrite_file (source.url, "/etc/installurl");
|
||||||
|
|
||||||
|
chsrc_say_lastly (&source, ChsrcTypeUntested);
|
||||||
|
}
|
||||||
|
|
||||||
|
def_target(os_openbsd);
|
Loading…
x
Reference in New Issue
Block a user