mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-20 12:00:37 +02:00
68 lines
2.4 KiB
Bash
68 lines
2.4 KiB
Bash
#!/usr/bin/env bash
|
|
# Created by Tobias Powalowski <tpowa@archlinux.org>
|
|
|
|
build ()
|
|
{
|
|
add_checked_modules '/drivers/net/'
|
|
apps="findssl.sh scp sftp ssh-add ssh-agent ssh-copy-id ssh-keygen ssh-keyscan sshd \
|
|
telnetd rsync exportfs nfsstat rpc.idmapd rpc.mountd rpc.nfsd rpc.statd rpcdebug showmount \
|
|
sm-notify start-statd rpcbind rpcinfo rpc.gssd mountpoint mountstats \
|
|
nfsdcltrack nfsiostat gssproxy"
|
|
for i in $apps; do
|
|
add_binary "$i"
|
|
done
|
|
symlinks="/usr/bin/screen"
|
|
for i in $symlinks; do
|
|
add_binary "$(which $(basename $(readlink "$i")))"
|
|
add_symlink "$i" "$(which $(basename $(readlink "$i")))"
|
|
done
|
|
add_file "/etc/screenrc"
|
|
add_file "/etc/ssh/ssh_config"
|
|
add_file "/etc/ssh/sshd_config"
|
|
add_file "/etc/ssh/moduli"
|
|
add_file "/etc/rsyncd.conf"
|
|
add_file "/etc/exports"
|
|
for i in $(find /usr/share/terminfo/ ! -type d); do
|
|
add_file "$i"
|
|
done
|
|
add_file "/usr/share/archboot/remote/etc/ssh/sshd_config" "/etc/ssh/sshd_config"
|
|
add_file "/usr/lib/ssh/sftp-server"
|
|
add_file "/usr/lib/ssh/ssh-keysign"
|
|
add_file "/usr/lib/ssh/ssh-pkcs11-helper"
|
|
add_dir "/var/empty"
|
|
add_file "/etc/conf.d/rpcbind"
|
|
add_file "/etc/gssapi_mech.conf"
|
|
add_file "/etc/netconfig"
|
|
add_full_dir "/usr/lib/libnfsidmap/"
|
|
add_dir "/var/lib/nfs/sm"
|
|
add_dir "/var/lib/nfs/sm.bak"
|
|
add_dir "/var/lib/nfs/v4recovery"
|
|
add_dir "/var/lib/nfs/rpc_pipefs"
|
|
add_dir "/var/lib/rpcbind"
|
|
chmod 700 "$BUILDROOT/var/lib/rpcbind"
|
|
chown 32:32 "$BUILDROOT/var/lib/rpcbind"
|
|
add_full_dir "/etc/gss"
|
|
add_full_dir "/etc/gssproxy"
|
|
add_full_dir "/var/lib/gssproxy"
|
|
add_dir "/var/log/gssproxy"
|
|
# start rpcbind on startup
|
|
add_symlink "/etc/systemd/system/sockets.target.wants/rpcbind.socket" "/usr/lib/systemd/system/rpcbind.socket"
|
|
add_dir "/var/lib/openldap"
|
|
chmod 700 "$BUILDROOT/var/lib/openldap"
|
|
chown 439:439 "$BUILDROOT/var/lib/openldap"
|
|
# start sshd on startup
|
|
add_symlink "/etc/systemd/system/multi-user.target.wants/sshd.service" "/usr/lib/systemd/system/sshd.service"
|
|
# fix licenses
|
|
add_file "/usr/share/licenses/rpcbind/COPYING"
|
|
add_file "/usr/share/licenses/libsasl/COPYING"
|
|
add_file "/usr/share/licenses/libldap/LICENSE"
|
|
add_file "/usr/share/licenses/nfsidmap/LICENSE"
|
|
add_file "/usr/share/licenses/libgssglue/COPYING"
|
|
}
|
|
|
|
help ()
|
|
{
|
|
cat<<HELPEOF
|
|
This hook includes remote tools on an arch boot image.
|
|
HELPEOF
|
|
}
|