added nfsd v3
This commit is contained in:
@@ -61,6 +61,12 @@ MINISATIP_OPTS=""
|
||||
#
|
||||
INETD="yes"
|
||||
|
||||
#
|
||||
# nfsd v3
|
||||
#
|
||||
NFSD="yes"
|
||||
NFSD_HOTPLUG_EXPORT="*" # replace with host or subnet, '*' = world
|
||||
|
||||
#
|
||||
# oscamd
|
||||
#
|
||||
|
2
fs-add/etc/exports
Normal file
2
fs-add/etc/exports
Normal file
@@ -0,0 +1,2 @@
|
||||
# example line:
|
||||
#/mnt/1 *(ro,insecure,all_squash,no_subtree_check)
|
23
fs-add/etc/init.d/axe-settings
Executable file
23
fs-add/etc/init.d/axe-settings
Executable file
@@ -0,0 +1,23 @@
|
||||
#!/bin/sh
|
||||
|
||||
if test -z "$STV6210_BAMP"; then
|
||||
test -r /etc/sysconfig/config && . /etc/sysconfig/config
|
||||
fi
|
||||
|
||||
val=""
|
||||
case "$STV6210_BAMP" in
|
||||
0dB|0|1dB|1) val=0 ;;
|
||||
2dB|2|3dB|3) val=1 ;;
|
||||
4dB|4|5dB|5) val=2 ;;
|
||||
6dB|6|7dB|7) val=3 ;;
|
||||
8dB|8|9dB|9) val=4 ;;
|
||||
10dB|10|11dB|11) val=5 ;;
|
||||
12dB|12|13dB|13) val=6 ;;
|
||||
14dB|14|15dB|15) val=7 ;;
|
||||
16dB|16|17dB|17) val=8 ;;
|
||||
esac
|
||||
if ! test -z "$val"; then
|
||||
axe-debug tdump > /tmp/stv6120-init.txt
|
||||
logger -p local0.notice "Setting STV6210 gain to ${val}"
|
||||
echo $val > /sys/devices/platform/i2c-stm.0/i2c-0/stv6120_gain
|
||||
fi
|
19
fs-add/etc/init.d/nfsd
Executable file
19
fs-add/etc/init.d/nfsd
Executable file
@@ -0,0 +1,19 @@
|
||||
#!/bin/sh
|
||||
|
||||
test -r /etc/sysconfig/config && . /etc/sysconfig/config
|
||||
|
||||
if test "$NFSD" != "yes"; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if test -r /etc/sysconfig/exports ; then
|
||||
rm /etc/exports
|
||||
ln -s /etc/sysconfig/exports /etc/exports
|
||||
fi
|
||||
|
||||
opts="--no-nfs-version 4"
|
||||
|
||||
rpcbind &
|
||||
exportfs -r
|
||||
nfsd $opts 8 &
|
||||
exec mountd -F $opts
|
@@ -30,7 +30,8 @@ mv /var /var.2
|
||||
mkdir /tmp/var
|
||||
ln -s /tmp/var /var
|
||||
rm -rf /var.2
|
||||
mkdir -p /tmp/var/run /tmp/var/log /tmp/var/spool
|
||||
mkdir -p /tmp/var/run /tmp/var/log /tmp/var/spool /var/lib/nfs
|
||||
mount -t nfsd nfsd /proc/fs/nfsd
|
||||
|
||||
# sysctl.conf
|
||||
sysctl -q -p
|
||||
|
@@ -6,6 +6,8 @@ ttyAS0::askfirst:/bin/sh
|
||||
::once:/etc/init.d/network
|
||||
# Time Network Protocol
|
||||
::once:/etc/init.d/ntpd
|
||||
# NFSD
|
||||
::once:/etc/init.d/nfsd
|
||||
# minisatip
|
||||
::once:/etc/init.d/satip
|
||||
# telnetd
|
||||
|
5
fs-add/etc/netconfig
Normal file
5
fs-add/etc/netconfig
Normal file
@@ -0,0 +1,5 @@
|
||||
udp tpi_clts v inet udp /dev/udp -
|
||||
tcp tpi_cots_ord v inet tcp /dev/tcp -
|
||||
icmp tpi_raw - inet icmp /dev/icmp -
|
||||
rawip tpi_raw - inet - /dev/rawip -
|
||||
local tpi_cots_ord - loopback - - -
|
13
fs-add/etc/nsswitch.conf
Normal file
13
fs-add/etc/nsswitch.conf
Normal file
@@ -0,0 +1,13 @@
|
||||
passwd: files
|
||||
shadow: files
|
||||
group: files
|
||||
hosts: files dns
|
||||
ethers: files
|
||||
netmasks: files
|
||||
networks: files
|
||||
protocols: files
|
||||
rpc: files
|
||||
services: files
|
||||
netgroup: files
|
||||
automount: files
|
||||
aliases: files
|
@@ -281,3 +281,10 @@ remotefs 556/tcp rfs_server rfs # Brunhoff remote filesystem
|
||||
|
||||
socks 1080/tcp # socks proxy server
|
||||
socks 1080/udp # socks proxy server
|
||||
|
||||
#
|
||||
# NFSD
|
||||
#
|
||||
|
||||
nfs 2049/tcp
|
||||
nfs 2049/udp
|
||||
|
@@ -4,25 +4,29 @@ add() {
|
||||
|
||||
BLKID=$(/sbin/blkid /dev/$MDEV)
|
||||
eval ${BLKID#*:}
|
||||
LABEL=$(echo "$LABEL" | sed -e 's/ /_/g')
|
||||
if [ -n "$LABEL" ]; then
|
||||
MOUNT_POINT=/media/$LABEL
|
||||
MOUNT_POINT="/media/$LABEL"
|
||||
else
|
||||
MOUNT_POINT=/media/$MDEV
|
||||
MOUNT_POINT="/media/$MDEV"
|
||||
fi
|
||||
|
||||
logger -p local0.notice "Mounting $MDEV : $MOUNT_POINT"
|
||||
|
||||
mkdir -p "$MOUNT_POINT"
|
||||
|
||||
for fs_type in vfat msdos ; do
|
||||
if $(mount -t $fs_type -o umask=0 /dev/$MDEV "$MOUNT_POINT" 2>/dev/null) ; then
|
||||
logger -p local0.notice "... $MDEV mounted using $fs_type filesystem"
|
||||
exit 0
|
||||
fi
|
||||
done
|
||||
for fs_type in ext4 ext3 ext2 ; do
|
||||
if $(mount -t $fs_type /dev/$MDEV "$MOUNT_POINT" 2>/dev/null) ; then
|
||||
logger -p local0.notice "... $MDEV mounted using $fs_type filesystem"
|
||||
for fs_type in vfat msdos ext4 ext3 ext2 ; do
|
||||
case "$fs_type" in
|
||||
vfat|msdos) opts="-o umask=0" ;;
|
||||
*) opts= ;;
|
||||
esac
|
||||
if $(mount -t $fs_type $opts /dev/$MDEV "$MOUNT_POINT" 2>/dev/null) ; then
|
||||
nfs=
|
||||
if test "$NFSD" = "yes" -a -n "$NFSD_HOTPLUG_EXPORT"; then
|
||||
exportfs -o rw,nohide,insecure,no_subtree_check "$NFSD_HOTPLUG_EXPORT":"$MOUNT_POINT"
|
||||
nfs=" (nfsd exported)"
|
||||
fi
|
||||
logger -p local0.notice "... $MDEV mounted using $fs_type filesystem${nfs}"
|
||||
exit 0
|
||||
fi
|
||||
done
|
||||
@@ -36,8 +40,11 @@ logger -p local0.notice "Unmounting $MDEV"
|
||||
for MOUNT_POINT in /media/* ; do
|
||||
if test -d "$MOUNT_POINT"; then
|
||||
d=$(mountpoint -n "$MOUNT_POINT" 2> /dev/null | cut -d ' ' -f 1)
|
||||
if test "$d" = "$MDEV" -o "$d" = "UNKNOWN"; then
|
||||
if test "$d" = "$MDEV" -o "$d" = "/dev/$MDEV" -o "$d" = "UNKNOWN"; then
|
||||
logger -p local0.notice "Unmounting $MDEV : $MOUNT_POINT"
|
||||
if test "$NFSD" = "yes" -a -n "$NFSD_HOTPLUG_EXPORT"; then
|
||||
exportfs -u "$NFSD_HOTPLUG_EXPORT":"$MOUNT_POINT"
|
||||
fi
|
||||
umount -f "$MOUNT_POINT"
|
||||
rmdir "$MOUNT_POINT"
|
||||
fi
|
||||
@@ -46,6 +53,8 @@ done
|
||||
|
||||
}
|
||||
|
||||
. /etc/sysconfig/config
|
||||
|
||||
case "$ACTION" in
|
||||
add) add ;;
|
||||
remove) remove ;;
|
||||
|
Reference in New Issue
Block a user