This commit is contained in:
Josh Wolf
2021-05-29 12:53:47 -06:00
parent 98b8b81885
commit ec2291323e
2 changed files with 3 additions and 15 deletions
+3 -14
View File
@@ -91,29 +91,18 @@ func (b *Bundle) ResolveBundleFromPath() error {
}
func (b Bundle) Setup(d driver.Driver, path string) error {
cwd, err := os.Getwd()
if err != nil {
return err
}
defer os.Chdir(cwd)
err = os.Chdir(path)
if err != nil {
return err
}
targetStatic := filepath.Join(d.VarPath(), d.AnonymousStaticPath(), b.Name)
if err := safeSymlink(StaticDirectory, targetStatic); err != nil {
if err := safeSymlink(filepath.Join(path, StaticDirectory), targetStatic); err != nil {
return err
}
targetImages := filepath.Join(d.VarPath(), d.PreloadImagesPath(), b.Name)
if err := safeSymlink(ImagePreloadDirectory, targetImages); err != nil {
if err := safeSymlink(filepath.Join(path, ImagePreloadDirectory), targetImages); err != nil {
return err
}
targetManifests := filepath.Join(d.VarPath(), d.AutodeployManifestsPath(), b.Name)
if err := safeSymlink(AutodeployDirectory, targetManifests); err != nil {
if err := safeSymlink(filepath.Join(path, AutodeployDirectory), targetManifests); err != nil {
return err
}
-1
View File
@@ -96,7 +96,6 @@ func StartDriver(d driver.Driver) error {
"INSTALL_K3S_SELINUX_WARN=true",
"INSTALL_K3S_SKIP_SELINUX_RPM=true",
"INSTALL_K3S_BIN_DIR=/opt/hauler/bin",
"INSTALL_K3S_SKIP_START=true",
}...)
out, err := cmd.CombinedOutput()
if err != nil {