initrd.scripts: refactor devicelist and rename to device_list()