mirror of
https://github.com/nchevsky/systemrescue-zfs.git
synced 2025-12-06 07:12:01 +01:00
mkpasswd is finally available packaged on Arch, so add it to allow manually replacing a password in /etc/shadow, for when chroots or pam don't work as wanted. Also supports advanced hash algos like yescrypt that can't be set via the pam stack yet. Because the source for mkpasswd is part of the whois package, it is currently packaged as part of whois. But it might get it's own package in the future, so add a check for /usr/bin/mkpasswd during build time.
42 lines
1.1 KiB
Bash
Executable file
42 lines
1.1 KiB
Bash
Executable file
#!/bin/bash
|
|
errcnt=0
|
|
|
|
for curfile in /usr/bin/{*btrfs*,*xfs*,dislocker*,udp*,dump,restore} \
|
|
/usr/bin/{ghex,growpart*,hardinfo,*lshw*,ms-sys,nwipe,whdd,zerofree} \
|
|
/opt/firefox*/firefox* \
|
|
/usr/lib/ntfs-3g/ntfs-plugin*.so \
|
|
/usr/lib/libgbm.so* \
|
|
/usr/lib/xorg/modules/drivers/modesetting_drv.so \
|
|
/usr/lib/libdislocker.so*
|
|
do
|
|
test -x ${curfile} || continue
|
|
file --mime ${curfile} | grep -q -E "x-pie-executable|x-sharedlib" || continue
|
|
|
|
if ldd ${curfile} | grep -q -F 'not found'
|
|
then
|
|
echo "ERROR: Program ${curfile} is missing libraries"
|
|
ldd ${curfile}
|
|
errcnt=$((errcnt + 1))
|
|
fi
|
|
|
|
done
|
|
|
|
# check for missing programs
|
|
# mkpasswd might be packaged separately from whois in the future
|
|
for curfile in /usr/bin/mkpasswd ; \
|
|
do
|
|
if ! [[ -x "${curfile}" ]]; then
|
|
echo "ERROR: Program ${curfile} is missing"
|
|
errcnt=$((errcnt + 1))
|
|
fi
|
|
done
|
|
|
|
if [ ${errcnt} -eq 0 ]
|
|
then
|
|
echo "SUCCESS: Have not found any missing library or program"
|
|
exit 0
|
|
else
|
|
echo "FAILURE: Have found ${errcnt} issues"
|
|
exit 1
|
|
fi
|