scaleway / image-tools

:nut_and_bolt: Scripts used to create Images on Scaleway - https://github.com/scaleway-community
https://github.com/scaleway-community
MIT License
117 stars 36 forks source link

Script oc-swapfile do not work #147

Closed ghost closed 8 years ago

ghost commented 8 years ago

Under Alpine Linux image, the script to create and enable a swapfile don't work. I get the following errors:

/usr/local/sbin/oc-swapfile: line 26: fallocate: command not found chmod: /swapfile: No such file or directory mkswap: can't open '/swapfile': No such file or directory swapon: can't stat '/swapfile': No such file or directory

moul commented 8 years ago

I will try to get a workaround for alpine linux :)

cc @aimxhaisse

moul commented 8 years ago

@matunixe the solution is to install fallocate, on alpine linux:

$ apk add util-linux

I will update the script to trigger a comprehensive ⚠️ inviting the user to install util-linux instead of crashing