dermotbradley / create-alpine-disk-image

Create cloud-init enabled Alpine disk images for physical machines (PCs & RPIs), VMs, and Cloud servers
GNU General Public License v2.0
93 stars 11 forks source link

Unassigned `$ramdisk_dir` #25

Closed HugoFlorentino closed 2 years ago

HugoFlorentino commented 2 years ago

The tool has an option for using ramdisk, if availale. However if ramdisk is not installed, an error appears when trying to generate the script:


  if mount | grep -q "$ramdisk_dir" ; then
                      ^----------^ SC2154: ramdisk_dir is referenced but not assigned.```
HugoFlorentino commented 2 years ago

I solved this error modifying the insert_runscript_functions block with this:

  if [ -n "${use_ramdisk+x}" ]; then
    insert_runscript_function_unmount_ramdisk
  fi