Comments (6)
even with validate_postnonchroot_template
disabled i'll git issues with how the command is split on space.
So I think it would be best to add a new option: PostChrootBashCmds
and have code like:
PostChrootBashCmds = ['echo hello', 'curl http://ascript | sh']
with ChrootOpen(target_dir) as _:
for cmd in PostChrootBashCmds:
subprocess.call(['/bin/bash', '-c', cmd])
from ister.
So do you want a non-chroot and chroot version of this post install shell command runner?
Also giving the shell commands the chroot location in an environment variable seems like the best way to go in the non-chroot case, is that fitting with your use case?
from ister.
I think the chroot version is more helpfull but having the none chroot version would be a nice extra.
agree passing in the chroot path as an env var is the way to go.
If you do go to add these. Perhaps also add a PreBashCmds. This would allow some way to shim in support for odd things like perhaps raid drivers.
from ister.
I have code working for the both chroot and non-chroot post handlers. I'm curious when exactly you'd like the pre handlers to be run though. I'd guess you'd get the most flexability from having them run directly after template validation but that could be too early. From my perspective having commands run after validation and before any actual processing would be enough to support raid. Any more details for your use case would be handy here.
from ister.
I didn't have a true use case for the pre command.
debian has something like this d-i preseed/early_command
it runes before the partitioner, so after validation should be a good place.
from ister.
@steverweber #105 created in response to this issue.
from ister.
Related Issues (20)
- Feature request: provide a way to connect to the wireless(wi-fi) network
- Remove netifaces dependency
- Improve display of swupd progress HOT 4
- ister must ignore mmcblk0rpmb as device HOT 1
- Error installing to BXT_GP board HOT 4
- replace kernel failed for Clear Linxu OS HOT 2
- Feature request: Disable network and update when install clear-xx-installer.img HOT 1
- Ister should use pytest HOT 3
- Consider installation as a CLI tool via pip HOT 2
- An invalid bundle name is still added to an image HOT 2
- The installer stops reporting "fdisk -l on /dev/mmcblk0rpmb" returned an error HOT 4
- 'No such file or directory' at end of mixer image build. HOT 5
- process_kernel_cmdline broken for token based builds
- Returning to bundle select screen keeps appends telemetrics bundle every time HOT 1
- Discussion of button theme HOT 6
- Update bundle selection to repace os-clr-on-clr with user-basic
- Installer doesn't list size of unpartitioned disks when selecting target disk
- NetworkRequirement's _network_connection() test should add test for dns
- Failure to install on nvme disk HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ister.