Skip to content
This repository was archived by the owner on Jun 10, 2019. It is now read-only.

Commit 44c5c17

Browse files
committed
Change location of expand-root script and drop .sh extension
1 parent fe4782b commit 44c5c17

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

bootstrapvz/plugins/expand_root/assets/expand-root.service

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ After=local-fs.target
88
Wants=local-fs.target
99

1010
[Service]
11-
ExecStart=/usr/bin/expand-root.sh DEVICE PARTITION FILESYSTEM
11+
ExecStart=/usr/local/sbin/expand-root DEVICE PARTITION FILESYSTEM
1212
Type=oneshot
1313

1414
[Install]

bootstrapvz/plugins/expand_root/tasks.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ class InstallExpandRootScripts(Task):
3434

3535
@classmethod
3636
def run(cls, info):
37-
expand_root_script = os.path.join(ASSETS_DIR, 'expand-root.sh')
37+
expand_root_script = os.path.join(ASSETS_DIR, 'expand-root')
3838
expand_root_service = os.path.join(ASSETS_DIR, 'expand-root.service')
3939

40-
expand_root_script_dest = os.path.join(info.root, 'usr/bin/expand-root.sh')
40+
expand_root_script_dest = os.path.join(info.root, 'usr/local/sbin/expand-root')
4141
expand_root_service_dest = os.path.join(info.root, 'etc/systemd/system/expand-root.service')
4242

4343
filesystem_type = info.manifest.plugins['expand_root'].get('filesystem_type')
@@ -49,10 +49,10 @@ def run(cls, info):
4949
os.chmod(expand_root_script_dest, 0750)
5050
shutil.copy(expand_root_service, expand_root_service_dest)
5151

52-
# Expand out options into expand-root.sh script.
52+
# Expand out options into expand-root script.
5353
opts = '%s %s %s' % (root_device, root_partition, filesystem_type)
54-
sed_i(expand_root_service_dest, r'^ExecStart=/usr/bin/expand-root.sh.*$',
55-
'ExecStart=/usr/bin/expand-root.sh %s' % opts)
54+
sed_i(expand_root_service_dest, r'^ExecStart=/usr/local/sbin/expand-root.*$',
55+
'ExecStart=/usr/local/sbin/expand-root %s' % opts)
5656

5757
# Enable systemd service
5858
log_check_call(['chroot', info.root, 'systemctl', 'enable', 'expand-root.service'])

0 commit comments

Comments
 (0)