Skip to content

Commit

Permalink
Fixed postinstall
Browse files Browse the repository at this point in the history
  • Loading branch information
clayrisser committed May 23, 2018
1 parent 34f76b3 commit 1f6abc6
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 18 deletions.
4 changes: 4 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ trim_trailing_whitespace = true
charset = utf-8
indent_size = 4

[*.{sh,seed}]
charset = utf-8
indent_size = 4

[*.{md,rst}]
charset = utf-8
trim_trailing_whitespace = false
Expand Down
4 changes: 0 additions & 4 deletions example/config.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
name: Forkbuntu
version: 18.04
release_notes: https://forkbuntu.codejam.ninja
paths:
iso: ubuntu-18.04-server-amd64.iso
output: forkbuntu.iso
packages:
- cowsay
repos:
- repo: 'http://repo.sinew.in/ stable main'
key: https://www.google.com
1 change: 1 addition & 0 deletions example/filesystem/etc/skel/README
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Welcome to Forkbuntu!
3 changes: 1 addition & 2 deletions src/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ def load_conf(conf):
'output': 'forkbuntu.iso',
'src': path.dirname(path.realpath(__file__)),
'tmp': mkdtemp()
},
'repos': []
}
})
)
8 changes: 3 additions & 5 deletions src/iso/preseed/forkbuntu.seed
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ d-i pkgsel/include string \
{% for package in packages %} {{ package }}{% if loop.index0 < packages|length - 1 %} \{% endif %}
{% endfor %}
{% endif %}# Post install
d-i preseed/late_command string cp -r /cdrom/scripts /target/root && \
chroot /target bash /root/scripts/run_postinstall.sh
d-i preseed/late_command string \
cp -r /cdrom/scripts /target/root && \
string chroot /target bash /root/scripts/run_postinstall.sh

# Network configuration
d-i netcfg/get_hostname string {{ hostname }}
Expand All @@ -40,9 +41,6 @@ d-i netcfg/get_hostname seen false
tasksel tasksel/first multiselect standard

# Apt setup
{% for repo in repos %}d-i apt-setup/local{{ loop.index0 }}/repository string {{ repo.repo }}
d-i apt-setup/local0/source boolean true{% if repo.key %}
d-i apt-setup/local{{ loop.index0 }}/key string {{ repo.key }}{% endif %}{% endfor %}
d-i apt-setup/restricted boolean true
d-i apt-setup/universe boolean true
d-i apt-setup/multiarch string i386
2 changes: 0 additions & 2 deletions src/iso/scripts/filesystem.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
#!/bin/bash

echo
2 changes: 0 additions & 2 deletions src/iso/scripts/postinstall.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
#!/bin/bash

echo
2 changes: 1 addition & 1 deletion src/iso/scripts/run_postinstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ unset DEBCONF_FRONTEND
unset DEBIAN_HAS_FRONTEND
unset DEBIAN_FRONTEND

bash postinstall.sh
bash /root/scripts/postinstall.sh
rm -rf /root/scripts
3 changes: 1 addition & 2 deletions src/services/configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ def merge_iso(self):
self.__stamp_template(
path.join(c.paths.mount, 'preseed', 'forkbuntu.seed'),
hostname=c.hostname,
packages=c.packages,
repos=c.repos
packages=c.packages
)
self.__stamp_template(path.join(c.paths.mount, '.disk', 'info'), description=c.description)
self.__stamp_template(path.join(c.paths.mount, 'README.diskdefines'), description=c.description)
Expand Down

0 comments on commit 1f6abc6

Please sign in to comment.