Newer
Older
barebox / defaultenv / defaultenv-2-base / init / automount
@Sascha Hauer Sascha Hauer on 21 Feb 2014 529 bytes move defaultenv-2 to defaultenv/defaultenv-2-*
#!/bin/sh

if [ "$1" = menu ]; then
	init-menu-add-entry "$0" "Automountpoints"
	exit
fi

# automount tftp server based on $eth0.serverip

mkdir -p /mnt/tftp
automount /mnt/tftp 'ifup eth0 && mount -t tftp $eth0.serverip /mnt/tftp'

# automount nfs server example

#nfshost=somehost
#mkdir -p /mnt/${nfshost}
#automount /mnt/$nfshost "ifup eth0 && mount -t nfs ${nfshost}:/tftpboot /mnt/${nfshost}"

# FAT on usb disk example

#mkdir -p /mnt/fat
#automount -d /mnt/fat 'usb && [ -e /dev/disk0.0 ] && mount /dev/disk0.0 /mnt/fat'