archboot/usr/lib/initcpio/install/archboot_base_update_installer

78 lines
3.6 KiB
Text
Raw Normal View History

#!/usr/bin/env bash
# Created by Tobias Powalowski <tpowa@archlinux.org>
build ()
{
apps="stat realpath install readlink ln mktemp depmod tee modinfo chown"
for i in $apps; do
add_binary "$i"
done
apps="getent head id cksum tail test tr uptime w who which whoami xargs \
swapon uniq cut seq snarf fdisk sfdisk cfdisk parted free less \
chgrp df dialog dmesg egrep fgrep stty sync tar bsdcpio hdparm \
chroot dirname expr bunzip2 bzcat bzip2 su cpio gzip top sdparm tput \
ifconfig losetup mkfifo mknod lzmadec lzop lzma lzcat unlzma unxz xzcat \
xz lastb last wall mesg utmpdump xzdec switch_root pivot_root chcpu ctrlaltdel \
raw gdisk sgdisk cgdisk fixparts findmnt lsblk swaplabel cal chrt col colcrt \
colrm column fallocate flock getopt ionice ipcmk ipcrm ipcs isosize swapoff \
look lscpu mcookie namei prlimit rename renice rev script scriptreplay uname26 \
linux32 linux64 setarch setsid setterm taskset ul unshare uuidgen whereis write \
addpart delpart ldattach partx readprofile rtcwake uuidd sysctl pgrep pkill pmap \
pwdx slabtop tload vmstat watch file eject keyctl request-key zsh hostname tac \
sulogin resizepart lslocks wdctl zless zgrep fold od ldd shred blockdev blkdiscard \
newgrp nsenter runuser vigr vipw ldconfig diff lsmod lzcmp lzdiff xzgrep lzegrep \
lzfgrep lzgrep lzfgrep lzgrep lzless lzmore nc reset rmmod blkzone chmem choom \
fincore hardlink irqtop lsipc lsirq lslogins lsmem lsns mkfs scriptlive setpriv \
uclampset uuidparse zramctl [ b2sum base32 base64 basenc chcon comm csplit \
dircolors expand factor fmt hostid join link logname md5sum nice nl nohup \
nproc numfmt paste pathchk pinky pr printenv ptx runcon sha1sum sha224sum \
sha256sum sha384sum sha512sum shuf split stdbuf sum timeout truncate tsort \
unexpand unlink users vdir pwait fuser peekfd prtstat pslog pstree newgidmap newuidmap \
lzmainfo xzcmp xzegrep xzfgrep gzexe uncompress zcmp zdiff zegrep zfgrep zforce zmore znew \
bzdiff bzgrep bzip2recover bzmore chacl getfacl setfacl attr getfattr \
setfattr pzstd unzstd zstdcat zstdgrep zstdless zstdmt lz4c lz4cat unlz4 lz4 gunzip zcat"
if [[ "$(uname -m)" == "x86_64" ]]; then
apps="i386 x86_64 $apps"
fi
for i in $apps; do
add_binary "$i"
rm /usr/bin/"$i"
done
### add zsh
add_full_dir "/etc/zsh"
add_full_dir "/usr/share/zsh"
add_full_dir "/usr/lib/zsh"
### add en_US.utf8 locale
add_file "/usr/lib/locale/locale-archive"
### adding passwd file for correct shell
add_file "/usr/share/archboot/base/etc/passwd" "/etc/passwd"
### fix file
add_file "/usr/share/file/misc/magic.mgc"
### add shadow
apps="groups chage chfn chsh expiry faillog gpasswd lastlog passwd \
chgpasswd chpasswd groupadd groupdel groupmems groupmod grpck grpconv grpunconv \
newusers pwck pwconv pwunconv useradd userdel usermod sg "
for i in $apps; do
add_binary "$i"
done
### fix licenses
add_file "/usr/share/licenses/file/COPYING"
add_file "/usr/share/licenses/bzip2/LICENSE"
add_file "/usr/share/licenses/hdparm/LICENSE.TXT"
add_file "/usr/share/licenses/ncurses/COPYING"
add_file "/usr/share/licenses/pcre/LICENSE"
add_file "/usr/share/licenses/sdparm/LICENSE"
add_file "/usr/share/licenses/zlib/LICENSE"
}
help ()
{
cat <<HELPEOF
This hook sets up base for a normal archboot image.
HELPEOF
}