2013-07-22 17:57:18 +02:00
|
|
|
#!/usr/bin/env bash
|
2008-12-06 19:12:19 +01:00
|
|
|
# Created by Tobias Powalowski <tpowa@archlinux.org>
|
|
|
|
|
2011-07-06 15:55:39 +02:00
|
|
|
build ()
|
2008-12-06 19:12:19 +01:00
|
|
|
{
|
2013-06-18 15:14:33 +02:00
|
|
|
apps="findssl.sh scp sftp ssh-add ssh-agent ssh-copy-id ssh-keygen ssh-keyscan sshd \
|
2013-05-22 11:42:51 +02:00
|
|
|
telnetd rsync exportfs nfsstat rpc.idmapd rpc.mountd rpc.nfsd rpc.statd rpcdebug showmount \
|
2015-03-08 12:23:44 +01:00
|
|
|
sm-notify start-statd rpcbind rpcinfo rpc.gssd mountpoint mountstats \
|
2020-07-17 11:03:17 +02:00
|
|
|
nfsdcltrack nfsiostat gssproxy"
|
2012-05-27 12:15:43 +02:00
|
|
|
for i in $apps; do
|
|
|
|
add_binary "$i"
|
|
|
|
done
|
2016-05-14 20:51:46 +02:00
|
|
|
symlinks="/usr/bin/screen"
|
2012-08-25 08:48:32 +02:00
|
|
|
for i in $symlinks; do
|
|
|
|
add_binary "$(which $(basename $(readlink "$i")))"
|
|
|
|
add_symlink "$i" "$(which $(basename $(readlink "$i")))"
|
|
|
|
done
|
2012-08-16 07:52:53 +02:00
|
|
|
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"
|
2008-12-06 19:12:19 +01:00
|
|
|
for i in $(find /usr/share/terminfo/ ! -type d); do
|
|
|
|
add_file "$i"
|
|
|
|
done
|
2013-08-28 09:12:43 +02:00
|
|
|
add_file "/usr/share/archboot/remote/etc/ssh/sshd_config" "/etc/ssh/sshd_config"
|
2008-12-06 19:12:19 +01:00
|
|
|
add_file "/usr/lib/ssh/sftp-server"
|
|
|
|
add_file "/usr/lib/ssh/ssh-keysign"
|
2012-04-20 15:50:41 +02:00
|
|
|
add_file "/usr/lib/ssh/ssh-pkcs11-helper"
|
2008-12-06 19:12:19 +01:00
|
|
|
add_dir "/var/empty"
|
2014-06-22 13:50:26 +02:00
|
|
|
add_file "/etc/conf.d/rpcbind"
|
2012-08-16 07:52:53 +02:00
|
|
|
add_file "/etc/gssapi_mech.conf"
|
|
|
|
add_file "/etc/netconfig"
|
2013-08-28 09:12:43 +02:00
|
|
|
add_full_dir "/usr/lib/libnfsidmap/"
|
2008-12-06 19:12:19 +01:00
|
|
|
add_dir "/var/lib/nfs/sm"
|
|
|
|
add_dir "/var/lib/nfs/sm.bak"
|
|
|
|
add_dir "/var/lib/nfs/v4recovery"
|
2009-06-17 11:16:19 +02:00
|
|
|
add_dir "/var/lib/nfs/rpc_pipefs"
|
2014-06-20 10:41:50 +02:00
|
|
|
add_dir "/var/lib/rpcbind"
|
2014-06-23 08:23:59 +02:00
|
|
|
chmod 700 "$BUILDROOT/var/lib/rpcbind"
|
|
|
|
chown 32:32 "$BUILDROOT/var/lib/rpcbind"
|
2015-03-08 11:22:40 +01:00
|
|
|
add_full_dir "/etc/gss"
|
|
|
|
add_full_dir "/etc/gssproxy"
|
|
|
|
add_full_dir "/var/lib/gssproxy"
|
|
|
|
add_dir "/var/log/gssproxy"
|
2015-01-14 19:51:07 +01:00
|
|
|
# start rpcbind on startup
|
2015-02-09 08:55:00 +01:00
|
|
|
add_symlink "/etc/systemd/system/sockets.target.wants/rpcbind.socket" "/usr/lib/systemd/system/rpcbind.socket"
|
2014-06-23 17:01:26 +02:00
|
|
|
add_dir "/var/lib/openldap"
|
2014-06-23 08:23:59 +02:00
|
|
|
chmod 700 "$BUILDROOT/var/lib/openldap"
|
|
|
|
chown 439:439 "$BUILDROOT/var/lib/openldap"
|
2013-06-18 15:52:48 +02:00
|
|
|
# start sshd on startup
|
|
|
|
add_symlink "/etc/systemd/system/multi-user.target.wants/sshd.service" "/usr/lib/systemd/system/sshd.service"
|
2009-05-08 08:05:45 +02:00
|
|
|
# fix licenses
|
2009-06-17 11:16:19 +02:00
|
|
|
add_file "/usr/share/licenses/rpcbind/COPYING"
|
2009-05-08 08:05:45 +02:00
|
|
|
add_file "/usr/share/licenses/libsasl/COPYING"
|
|
|
|
add_file "/usr/share/licenses/libldap/LICENSE"
|
|
|
|
add_file "/usr/share/licenses/nfsidmap/LICENSE"
|
2011-07-30 10:50:27 +02:00
|
|
|
add_file "/usr/share/licenses/libgssglue/COPYING"
|
2008-12-06 19:12:19 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
help ()
|
|
|
|
{
|
|
|
|
cat<<HELPEOF
|
2021-10-04 11:13:50 +02:00
|
|
|
This hook includes remote tools on an archboot image.
|
2008-12-06 19:12:19 +01:00
|
|
|
HELPEOF
|
2009-06-17 11:16:19 +02:00
|
|
|
}
|