-v /etc/init.d/fstab enable ||:
-
-# rebooting makes mounting work, but comparing lsmod,
-# i'm guessing this will too. todo, test it.
-# 255 == module already loaded
-for mod in scsi_mod sd_mod; do v modprobe $mod || [[ $? == 255 ]]; done
-
-# for arch pxe. The default settings in the installer expect to find
-# the NFS at /run/archiso/bootmnt
-mkdir -p /run/archiso/bootmnt
-
-# todo: at some later time, i found /mnt/usb not mounted, watch to see if
-# that is the case after running this or rebooting.
-# wiki says safe to do in case of fstab changes:
-cedit /etc/config/fstab <<'EOF' || { v block umount; v block mount; }
-config global automount
- option from_fstab 1
- option anon_mount 1
-
-config global autoswap
- option from_fstab 1
- option anon_swap 1
-
-config mount
- option target /mnt/usb
- option device /dev/sda2
- option fstype ext4
- option options rw,async,noatime,nodiratime
- option enabled 1
- option enabled_fsck 0
-
-config swap
- option device /dev/sda1
- option enabled 1
-
-EOF
-
-
-
- # exportfs -ra won't cut it when its the same path, but now a bind mount
-cedit /etc/exports <<'EOF' || v /etc/init.d/nfsd restart ||:
-/mnt/usb 192.168.1.0/255.255.255.0(rw,no_root_squash,insecure,sync,no_subtree_check)
-# for arch pxe
-/run/archiso/bootmnt 192.168.1.0/255.255.255.0(rw,no_root_squash,insecure,sync,no_subtree_check)
-
-EOF
-
-
-v /etc/init.d/portmap start
-v /etc/init.d/nfsd start
-v /etc/init.d/portmap enable
-v /etc/init.d/nfsd enable
-
-
-
-cedit /etc/config/firewall <<'EOF' || /etc/init.d/firewall restart
-# port forwarding
-config redirect
-option name bittorrent
-option src wan
-option src_dport 63324
-option dest_ip 192.168.1.2
-option dest lan
-# making the port open (not sure if this is actually needed)
-config rule
-option src wan
-option target ACCEPT
-option dest_port 63324
-
-
-config redirect
-option name bithtpc
-option src wan
-option src_dport 63325
-option dest_ip 192.168.1.4
-option dest lan
-
-config rule
-option src wan
-option target ACCEPT
-option dest_port 63325
-
-
-config redirect
-option name ssh
-option src wan
-#uncomment the 2 lines for security of using a non-standard port
-# and comment out the 22 port line
-# option src_dport 63321
-option src_dport 22
-option dest_ip 192.168.1.2
-option dest lan
-# option dest_port 22 # already default
-
-config rule
-option src wan
-option target ACCEPT
-option dest_port 22
-