Merge "Add systemd/fedora support to growroot"
This commit is contained in:
commit
8fde161540
12
elements/growroot/init-scripts/systemd/growroot.service
Normal file
12
elements/growroot/init-scripts/systemd/growroot.service
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Grow root partition
|
||||||
|
After=local-fs.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=oneshot
|
||||||
|
User=root
|
||||||
|
ExecStart=/usr/local/sbin/growroot
|
||||||
|
RemainAfterExit=true
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
2
elements/growroot/package-installs.yaml
Normal file
2
elements/growroot/package-installs.yaml
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
growpart:
|
||||||
|
e2fsprogs:
|
12
elements/growroot/pkg-map
Normal file
12
elements/growroot/pkg-map
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"family":{
|
||||||
|
"redhat": {
|
||||||
|
"growpart": "cloud-utils-growpart",
|
||||||
|
"e2fsprogs": "e2fsprogs"
|
||||||
|
},
|
||||||
|
"debian":{
|
||||||
|
"growpart": "cloud-utils",
|
||||||
|
"e2fsprogs": "e2fsprogs"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
21
elements/growroot/post-install.d/80-growroot
Executable file
21
elements/growroot/post-install.d/80-growroot
Executable file
@ -0,0 +1,21 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then
|
||||||
|
set -x
|
||||||
|
fi
|
||||||
|
set -eu
|
||||||
|
set -o pipefail
|
||||||
|
|
||||||
|
case "$DIB_INIT_SYSTEM" in
|
||||||
|
upstart)
|
||||||
|
# nothing to do
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
systemd)
|
||||||
|
systemctl enable growroot.service
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Unsupported init system"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
Loading…
Reference in New Issue
Block a user