#!/bin/sh
# Include all busybox commands.
busybox-links touch
# And other commands.
w >/dev/null
top -h >/dev/null
diff -h >/dev/null 2>&1
cmp -h >/dev/null 2>&1
ftp </dev/null >/dev/null
ssh >/dev/null 2>&1
ssh-keygen -h >/dev/null 2>&1
touch /etc/ssh/*key*
sshd -h >/dev/null 2>&1
touch /etc/init.d/ssh /etc/default/ssh
scp >/dev/null 2>&1
touch /etc/ssh/*_config
nano -h >/dev/null 2>&1
flash_eraseall >/dev/null 2>&1
flash_erase >/dev/null 2>&1
flashcp >/dev/null 2>&1
iwconfig >/dev/null 2>&1

touch /etc/pcmcia/*
touch /etc/pcmcia/cis/*
cardctl -h >/dev/null 2>&1

# nanox scree saver
touch /opt/nanox/bin/nsaver

# Include some runlevels.
touch /etc/rc0.d/*
touch /etc/rc1.d/*
touch /etc/rc6.d/*
touch /etc/rcS.d/S03mtdextras
touch /sbin/reboot
touch /sbin/telinit

# de-calibrate touch screen.
# XXX really doesn't belong in this script
rm -f /opt/nanox/nxcal.dat

# Pam stuff needed for ssh server.
touch /etc/pam.conf /etc/pam.d/*common* /etc/pam.d/ssh
touch /lib/security/pam_env.so /lib/security/pam_unix.so
touch /lib/security/pam_motd.so /lib/security/pam_limits.so
touch /lib/security/pam_nologin.so
touch /lib/libcap*
touch /lib/libgcc_s*

touch /lib/firmware/zd1211/* || true
