Skip to content

Commit

Permalink
Merge pull request #89 from mkumatag/fix_ds
Browse files Browse the repository at this point in the history
Fix the ds-identify file
  • Loading branch information
ltccci authored Dec 14, 2020
2 parents c583ad5 + 8e99681 commit d18dc7f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
6 changes: 3 additions & 3 deletions cmd/image/qcow2ova/prep/prepare.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,17 +79,17 @@ func prepare(mnt, volume, dist, rhnuser, rhnpasswd, rootpasswd string) error {
if err != nil {
return err
}
err = ioutil.WriteFile(filepath.Join(mnt, "setup.sh"), []byte(setupStr), 744)
err = ioutil.WriteFile(filepath.Join(mnt, "setup.sh"), []byte(setupStr), 0744)
if err != nil {
return err
}

err = ioutil.WriteFile(filepath.Join(mnt, "/etc/cloud/cloud.cfg"), []byte(cloudConfig), 644)
err = ioutil.WriteFile(filepath.Join(mnt, "/etc/cloud/cloud.cfg"), []byte(cloudConfig), 0644)
if err != nil {
return err
}

err = ioutil.WriteFile(filepath.Join(mnt, "/etc/cloud/ds-identify.conf"), []byte(dsIdentify), 644)
err = ioutil.WriteFile(filepath.Join(mnt, "/etc/cloud/ds-identify.cfg"), []byte(dsIdentify), 0644)
if err != nil {
return err
}
Expand Down
9 changes: 6 additions & 3 deletions cmd/image/qcow2ova/prep/templates.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ subscription-manager clean
rpm -e ibm-power-repo-*.noarch
mv /etc/resolv.conf.orig /etc/resolv.conf | true
touch /.autorelabel`
touch /.autorelabel
`

var cloudConfig = `# The top level settings are used as module
# and system configuration.
Expand Down Expand Up @@ -159,9 +160,11 @@ system_info:
ssh_svcname: sshd
bootcmd:
- 'echo "IPV6_AUTOCONF=no" >> /etc/sysconfig/network-scripts/ifcfg-$(ls /sys/class/net -1| grep env.|sort -n -r|head -1)'`
- 'echo "IPV6_AUTOCONF=no" >> /etc/sysconfig/network-scripts/ifcfg-$(ls /sys/class/net -1| grep env.|sort -n -r|head -1)'
`

var dsIdentify = `policy: search,found=all,maybe=all,notfound=disabled`
var dsIdentify = `policy: search,found=all,maybe=all,notfound=disabled
`

type Setup struct {
Dist, RHNUser, RHNPassword, RootPasswd string
Expand Down

0 comments on commit d18dc7f

Please sign in to comment.