[0/6] [0s] [1/6] Fetching image [0s] [2/6] Unpacking image [0s] [3/6] Fetching kernel [0s] [4/6] Fetching init image [0s] [5/6] Unpacking init image [0s] [6/6] Starting container [0s] [6/6] Starting container [1s] == extracted %post lua == local nl = '\n' local cosh = '/usr/bin/cosh' local f = io.open('/etc/shells', 'a+') if f then f:seek('set') local shells = f:read('*all') or '' local normalized = nl..shells if shells ~= '' and shells:sub(-1) ~= nl then normalized = normalized..nl end if not normalized:find(nl..cosh..nl, 1, true) then local separator = (shells ~= '' and shells:sub(-1) ~= nl) and nl or '' f:write(separator, cosh, nl) end f:close() end == fixture (cat -A) == /bin/sh$ /bin/bash rc_first=0 == after first run (cat -A) == /bin/sh$ /bin/bash$ /usr/bin/cosh$ rc_second=0 == after second run (cat -A) == /bin/sh$ /bin/bash$ /usr/bin/cosh$ glued_lines=0 standalone_entries=1 VERDICT: PASS (single clean entry, idempotent) container_exit=0