mirror of
https://github.com/HikariKnight/quickpassthrough.git
synced 2025-05-19 09:45:42 -04:00
port more of the bash config
This commit is contained in:
parent
8c35e8d328
commit
a2e641f867
1 changed files with 12 additions and 1 deletions
|
@ -59,6 +59,7 @@ func GetConfig() *Config {
|
||||||
func InitConfigs() {
|
func InitConfigs() {
|
||||||
config := GetConfig()
|
config := GetConfig()
|
||||||
|
|
||||||
|
// Add all directories we need into a stringlist
|
||||||
dirs := []string{
|
dirs := []string{
|
||||||
config.path.MODPROBE,
|
config.path.MODPROBE,
|
||||||
config.path.INITRAMFS,
|
config.path.INITRAMFS,
|
||||||
|
@ -85,6 +86,7 @@ func InitConfigs() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Add all files we need to a stringlist
|
||||||
files := []string{
|
files := []string{
|
||||||
config.path.ETCMODULES,
|
config.path.ETCMODULES,
|
||||||
config.path.MKINITCPIO,
|
config.path.MKINITCPIO,
|
||||||
|
@ -101,7 +103,16 @@ func InitConfigs() {
|
||||||
// Create the directories for our configs
|
// Create the directories for our configs
|
||||||
file, err := os.Create(conffile)
|
file, err := os.Create(conffile)
|
||||||
errorcheck.ErrorCheck(err)
|
errorcheck.ErrorCheck(err)
|
||||||
defer file.Close()
|
// Close the file so we can edit it
|
||||||
|
file.Close()
|
||||||
|
}
|
||||||
|
|
||||||
|
// If we now have a config that exists
|
||||||
|
if _, err := os.Stat(conffile); !errors.Is(err, os.ErrNotExist) {
|
||||||
|
header := readHeader(4, sysfile)
|
||||||
|
writeContent(header, conffile)
|
||||||
|
addModules(conffile)
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue