This file is indexed.

/usr/share/initramfs-tools/scripts/casper-bottom/13swap is in casper 1.394.

This file is owned by root:root, with mode 0o755.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/sh

PREREQ=""
DESCRIPTION="Setting up swap..."

prereqs()
{
       echo "$PREREQ"
}

case $1 in
# get pre-requisites
prereqs)
       prereqs
       exit 0
       ;;
esac

. /scripts/casper-functions

log_begin_msg "$DESCRIPTION"

devices=""
for device in /dev/[hsv]d[a-z][0-9]*; do
    if ! [ -b "$device" ]; then
        continue
    fi

    /sbin/blkid -o udev -p ${device%%[0-9]*} | grep -q "^ID_FS_USAGE=raid" && continue

    magic=$(/bin/dd if="$device" bs=4086 skip=1 count=1 2>/dev/null | /bin/dd bs=10 count=1 2>/dev/null) || continue
    
    if [ "$magic" = "SWAPSPACE2" -o "$magic" = "SWAP-SPACE" ]; then
#        log "Found $device"
        devices="$devices $device"
        fi
done

for device in $devices; do
    swapon $device || true
done

log_end_msg