# Architecture-independend Files
REQUIRED_PROGS=(
"${REQUIRED_PROGS[@]:-}"
parted
)

PROGS=(
${PROGS[@]:-}
partprobe
fdisk
cfdisk
sfdisk
)

# progs to take along
PROGS=(
${PROGS[@]:-}
rpc.statd
rpcbind
bash
mknod
blkid
vol_id
udev_volume_id
portmap
readlink
rpcinfo
grep
cat
tac
tr
reboot
halt
shutdown
killall5
killall
chroot
tee
awk
ip
ifconfig
nslookup
route
ifenslave
ifrename
nameif
klogd
syslog-ng
syslogd
rsyslogd
echo
cp
date
wc
cut
rm
rmdir
test
init
telinit
ethtool
expand
sed
mount
umount
insmod
modprobe
lsmod
true
false
mingetty
agetty
getty
rmmod
hostname
uname
sleep
logger
ps
pstree
ln
dirname
basename
mkdir
tty
ping
netstat
free
traceroute
less
vi
pico
nano
rmmod
df
ls
dmesg
du
tar
gzip
netcat
curl
top
iptraf
joe
getent
id
ldd
strace
rsync
tail
head
find
md5sum
mkfs
mkfs.ext2
mkfs.ext3
mkfs.ext4
mkfs.ext4dev
mkfs.jfs
mkfs.xfs
mkfs.reiserfs
mkfs.vfat
mkfs.btrfs
mkreiserfs
fsck
fsck.ext2
fsck.ext3
fsck.ext4
fsck.ext4dev
fsck.xfs
fsck.reiserfs
reiserfsck
fsck.btrfs
findmnt
btrfsck
tune2fs
tune4fs
xfs_admin
xfs_db
xfs_repair
xfs_info
xfs_growfs
btrfs
jfs_tune
reiserfstune
expr
egrep
grep
fgrep
chmod
chown
stat
mkswap
swapon
swapoff
mknod
touch
scsi_id
lsscsi
logd
initctl
lspci
usleep
mktemp
/bin/true
strace
which
mkfifo
seq
openvt
poweroff
chacl
getfacl
setfacl
attr
getfattr
setfattr
mpath_wait
strings
xargs
sg_inq
env
w
dosfslabel
sysctl
)

# the lib* serves to cover both 32bit and 64bit libraries!
#
LIBS=(
${LIBS[@]:-}

### needed for username lookups
/lib*/libnss_dns*
/lib*/libnss_files*
### support multiarch
/lib/*/libnss_dns*
/lib/*/libnss_files*

/lib*/libgcc_s*
/lib*/libresolv*
/usr/lib*/rsyslog/*so
/lib*/rsyslog/*so

/usr/lib*/syslog-ng/*

### needed for curl HTTPS
/lib*/libnsspem.so*
/usr/lib*/libnsspem.so*
/lib*/libfreebl*.so*
/usr/lib*/libfreebl*.so*
/lib*/libnss3.so*
/usr/lib*/libnss3.so*
/lib*/libnssutil3.so*
/usr/lib*/libnssutil3.so*
/lib*/libsoftokn3.so*
/usr/lib*/libsoftokn3.so*
/lib*/libsqlite3.so*
/usr/lib*/libsqlite3.so*
/lib*/libfreeblpriv3.so*
/usr/lib*/libfreeblpriv3.so*
/lib*/libssl.so*
/usr/lib*/libssl.so*
/lib*/libnssdbm3.so*
/usr/lib*/libnssdbm3.so*
)

MODULES=(
${MODULES[@]:-}
vfat
nls_iso8859_1
nls_utf8
nls_cp437
af_packet
unix
nfs
nfsv4
nfsv3
lockd
sunrpc
cifs
usbcore
usb_storage
usbhid
sr_mod
ide_cd
cdrom
uhci_hcd
ehci_hcd
xhci_hcd
ohci_hcd
zlib
zlib-inflate
zlib-deflate
libcrc32c
crc32c
crc32c-intel
)

COPY_AS_IS=( ${COPY_AS_IS[@]:-} /dev /etc/inputr[c] /etc/protocols /etc/services /etc/rpc /etc/termcap /etc/terminfo /lib*/terminfo /usr/share/terminfo /etc/netconfig /etc/mke2fs.conf /etc/*-release /etc/localtime /etc/magic /usr/share/misc/magic /etc/dracut.conf /etc/dracut.conf.d /usr/lib/dracut /sbin/modprobe.ksplice-orig /etc/sysctl.conf /etc/sysctl.d /etc/e2fsck.conf )
# Required by curl with https:
# There are stored the distribution provided certificates
# installed from packages, nothing confidential.
# Usually the public verified certs, and not private keys.
# The private keys are stored in /etc/ssl/private (not copied)
# Private keys in /etc/pki/* are excluded (see below).
COPY_AS_IS=( "${COPY_AS_IS[@]}" '/etc/ssl/certs/*' '/etc/pki/*' '/usr/lib/ssl/*' '/usr/share/ca-certificates/*' )
# exclude /dev/shm/*, due to the way we use tar the leading / should be omitted
COPY_AS_IS_EXCLUDE=( ${COPY_AS_IS_EXCLUDE[@]:-} dev/shm/\* )
# Exclude private keys: /etc/pki/tls/private /etc/pki/CA/private /etc/pki/nssdb/key*.db and /usr/lib/ssl/private (cf. above):
COPY_AS_IS_EXCLUDE=( "${COPY_AS_IS_EXCLUDE[@]}" '/etc/pki/tls/private' '/etc/pki/CA/private' '/etc/pki/nssdb/key*.db' '/usr/lib/ssl/private' )

# some stuff for the Linux command line
KERNEL_CMDLINE="$KERNEL_CMDLINE selinux=0"
# common users and groups
CLONE_USERS=( "${CLONE_USERS[@]:-}" daemon rpc usbmuxd usbmux vcsa nobody dbus )
CLONE_GROUPS=( "${CLONE_GROUPS[@]:-}" tty usbmuxd usbmux fuse kvm oinstall dbus )

