File: detect.sh

package info (click to toggle)
debootstick 2.8
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 296 kB
  • sloc: sh: 1,364; makefile: 34
file content (17 lines) | stat: -rwxr-xr-x 367 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/sh
fs_tree=$1

# the files we check here are part of the libc package,
# so one of them should be here, depending on CPU architecture.

if ls "$fs_tree/etc/ld.so.conf.d/i"*"86-linux-gnu.conf" >/dev/null 2>&1
then
    exit 0  # OK
fi

if ls "$fs_tree/etc/ld.so.conf.d/x86_64-linux-gnu.conf" >/dev/null 2>&1
then
    exit 0  # OK
fi

exit 1  # not such a system