2013-07-22 17:57:18 +02:00
|
|
|
#!/usr/bin/env bash
|
2007-02-22 23:46:50 +01:00
|
|
|
# Created by Tobias Powalowski <tpowa@archlinux.org>
|
|
|
|
|
2011-07-06 15:55:39 +02:00
|
|
|
build ()
|
2007-02-22 23:46:50 +01:00
|
|
|
{
|
2022-01-31 10:49:49 +01:00
|
|
|
apps="getent head id cksum tail tee test tr uptime w who which whoami xargs \
|
2022-02-03 09:09:19 +01:00
|
|
|
swapon uniq cut seq snarf fdisk sfdisk cfdisk parted free less \
|
2022-01-31 10:49:49 +01:00
|
|
|
chgrp chown date df dialog dmesg egrep fgrep stty sync tar bsdcpio hdparm \
|
2022-02-03 07:28:14 +01:00
|
|
|
mktemp chroot dirname expr bzip2 hwclock su cpio gzip top sdparm tput \
|
2022-01-31 10:49:49 +01:00
|
|
|
ifconfig ln losetup mkfifo mknod readlink lzmadec lzop xz last wall mesg utmpdump \
|
|
|
|
xzdec switch_root pivot_root chcpu ctrlaltdel raw gdisk sgdisk cgdisk fixparts findmnt \
|
2022-02-03 07:28:14 +01:00
|
|
|
lsblk swaplabel cal chrt col colcrt colrm column fallocate flock getopt \
|
2022-01-31 10:49:49 +01:00
|
|
|
ionice ipcmk ipcrm ipcs isosize swapoff look lscpu mcookie namei prlimit rename \
|
|
|
|
renice rev script scriptreplay setarch setsid setterm taskset ul unshare \
|
2022-01-21 10:17:10 +01:00
|
|
|
uuidgen whereis write addpart delpart ldattach partx readprofile rtcwake uuidd \
|
|
|
|
sysctl pgrep pkill pmap pwdx slabtop tload vmstat watch file eject keyctl request-key \
|
2022-01-31 10:49:49 +01:00
|
|
|
zsh hostname tac sulogin resizepart lslocks wdctl zless zgrep fold od ldd \
|
|
|
|
shred blockdev blkdiscard newgrp nsenter runuser vipw ldconfig diff depmod \
|
|
|
|
linux32 linux64 lsmod lzcat lzcmp lzdiff lzegrep lzfgrep lzgrep lzegrep lzfgrep \
|
|
|
|
lzgrep lzless lzmore lzma modinfo nc reset rmmod unlzma unxz xzcat lastb stat \
|
|
|
|
blkzone chmem choom fincore hardlink irqtop lsipc lsirq lslogins lsmem lsns mkfs \
|
|
|
|
scriptlive setpriv uclampset uname26 uuidparse zramctl [ b2sum base32 base64 \
|
|
|
|
basenc chcon comm csplit dircolors expand factor fmt hostid install join link \
|
|
|
|
logname md5sum nice nl nohup nproc numfmt paste pathchk pinky pr printenv ptx realpath \
|
2022-01-27 22:22:31 +01:00
|
|
|
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 \
|
2022-01-28 09:16:19 +01:00
|
|
|
bunzip2 bzcat bzdiff bzgrep bzip2recover bzmore chacl getfacl setfacl attr getfattr \
|
2022-02-03 09:09:19 +01:00
|
|
|
setfattr pzstd unzstd zstdcat zstdgrep zstdless zstdmt lz4 lz4c lz4cat unlz4 gunzip zcat"
|
2022-01-21 10:17:10 +01:00
|
|
|
if [[ "$(uname -m)" == "x86_64" ]]; then
|
2022-01-27 22:22:31 +01:00
|
|
|
apps="$apps i386 x86_64"
|
2022-01-21 10:17:10 +01:00
|
|
|
fi
|
2012-05-27 22:28:05 +02:00
|
|
|
for i in $apps; do
|
|
|
|
add_binary "$i"
|
|
|
|
done
|
2012-08-16 12:36:46 +02:00
|
|
|
### add zsh
|
2012-08-15 14:22:43 +02:00
|
|
|
add_full_dir "/etc/zsh"
|
|
|
|
add_full_dir "/usr/share/zsh"
|
|
|
|
add_full_dir "/usr/lib/zsh"
|
2012-10-08 10:38:58 +02:00
|
|
|
|
|
|
|
### add en_US.utf8 locale
|
|
|
|
add_file "/usr/lib/locale/locale-archive"
|
2012-08-16 12:36:46 +02:00
|
|
|
|
2022-01-31 15:03:27 +01:00
|
|
|
### adding passwd file for correct shell
|
2022-01-31 15:11:12 +01:00
|
|
|
add_file "/usr/share/archboot/base/etc/passwd" "/etc/passwd"
|
2022-01-31 10:49:49 +01:00
|
|
|
### fix file
|
|
|
|
add_file "/usr/share/file/misc/magic.mgc"
|
|
|
|
|
2012-09-10 19:01:45 +02:00
|
|
|
### add shadow
|
2022-01-31 10:49:49 +01:00
|
|
|
apps="groups chage chfn chsh expiry faillog gpasswd lastlog passwd \
|
2013-05-22 09:36:34 +02:00
|
|
|
chgpasswd chpasswd groupadd groupdel groupmems groupmod grpck grpconv grpunconv \
|
2022-01-21 10:17:10 +01:00
|
|
|
newusers pwck pwconv pwunconv useradd userdel usermod sg vigr"
|
2012-09-10 19:01:45 +02:00
|
|
|
for i in $apps; do
|
|
|
|
add_binary "$i"
|
|
|
|
done
|
2021-10-07 09:15:36 +02:00
|
|
|
|
2009-05-24 15:47:17 +02:00
|
|
|
### fix licenses
|
2012-04-20 16:20:18 +02:00
|
|
|
add_file "/usr/share/licenses/file/COPYING"
|
2009-05-08 08:05:45 +02:00
|
|
|
add_file "/usr/share/licenses/bzip2/LICENSE"
|
|
|
|
add_file "/usr/share/licenses/hdparm/LICENSE.TXT"
|
2021-08-08 18:44:19 +02:00
|
|
|
add_file "/usr/share/licenses/ncurses/COPYING"
|
2009-05-08 08:05:45 +02:00
|
|
|
add_file "/usr/share/licenses/pcre/LICENSE"
|
2013-01-21 16:17:52 +01:00
|
|
|
add_file "/usr/share/licenses/sdparm/LICENSE"
|
2010-02-07 23:43:45 +01:00
|
|
|
add_file "/usr/share/licenses/zlib/LICENSE"
|
2007-02-22 23:46:50 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
help ()
|
|
|
|
{
|
|
|
|
cat <<HELPEOF
|
2022-01-31 10:49:49 +01:00
|
|
|
This hook sets up base for a normal archboot image.
|
2007-02-22 23:46:50 +01:00
|
|
|
HELPEOF
|
|
|
|
}
|