mirror of
https://github.com/gtxaspec/wz_mini_hacks.git
synced 2024-11-25 14:57:19 +00:00
enable swap earlier
This commit is contained in:
parent
a816fb2014
commit
a88b05c626
@ -28,6 +28,13 @@ export WZMINI_CFG=/opt/wz_mini/wz_mini.conf
|
||||
echo "welcome to wz_post.sh"
|
||||
echo "PID $$"
|
||||
|
||||
if [[ "$ENABLE_SWAP" == "true" ]] && [[ -e /opt/wz_mini/swap ]]; then
|
||||
echo "swap file found, enable"
|
||||
swapon /opt/wz_mini/swap
|
||||
else
|
||||
echo "swap file missing"
|
||||
fi
|
||||
|
||||
if [ -d /lib/modules ]; then
|
||||
echo "mount kernel modules"
|
||||
mount --bind /opt/wz_mini/lib/modules /lib/modules
|
||||
|
@ -124,8 +124,13 @@ netloop() {
|
||||
|
||||
swap_enable() {
|
||||
if [[ -e /opt/wz_mini/swap ]]; then
|
||||
echo "Swap exists, enable"
|
||||
echo "Swap file exists"
|
||||
if cat /proc/swaps | grep "mini" ; then
|
||||
echo "Swap is already enabled"
|
||||
else
|
||||
echo "Enable swap"
|
||||
swapon /opt/wz_mini/swap
|
||||
fi
|
||||
else
|
||||
echo "Swap file missing!"
|
||||
fi
|
||||
@ -168,14 +173,7 @@ V2="false"
|
||||
KMOD_PATH="/opt/wz_mini/lib/modules/3.10.14__isvp_swan_1.0__"
|
||||
fi
|
||||
|
||||
if [[ "$ENABLE_SWAP" == "true" ]]; then
|
||||
if cat /proc/swaps | grep "mini" ; then
|
||||
echo "Swap is already enabled"
|
||||
else
|
||||
echo "Swap not enabled, enabling"
|
||||
swap_enable
|
||||
fi
|
||||
fi
|
||||
swap_enable
|
||||
|
||||
if [[ "$ENABLE_IPV6" == "true" ]]; then
|
||||
echo "ipv6 enabled"
|
||||
@ -226,11 +224,7 @@ if [[ "$ENABLE_USB_ETH" == "true" ]]; then
|
||||
insmod $KMOD_PATH/kernel/drivers/net/usb/$i.ko
|
||||
done
|
||||
|
||||
if [[ "$ENABLE_SWAP" == "true" ]]; then
|
||||
echo "swap already enabled"
|
||||
else
|
||||
swap_enable
|
||||
fi
|
||||
|
||||
netloop eth0
|
||||
|
||||
@ -267,11 +261,7 @@ if [[ "$ENABLE_USB_DIRECT" == "true" ]]; then
|
||||
|
||||
sleep 1
|
||||
|
||||
if [[ "$ENABLE_SWAP" == "true" ]]; then
|
||||
echo "swap already enabled"
|
||||
else
|
||||
swap_enable
|
||||
fi
|
||||
|
||||
#loop begin
|
||||
while true
|
||||
@ -292,11 +282,7 @@ if [[ "$ENABLE_USB_RNDIS" == "true" ]]; then
|
||||
|
||||
sleep 1
|
||||
|
||||
if [[ "$ENABLE_SWAP" == "true" ]]; then
|
||||
echo "swap already enabled"
|
||||
else
|
||||
swap_enable
|
||||
fi
|
||||
|
||||
#loop begin
|
||||
while true
|
||||
@ -402,11 +388,7 @@ if [[ "$RTSP_HI_RES_ENABLED" == "true" ]]; then
|
||||
HI_VIDEO_DEV="/dev/video1"
|
||||
fi
|
||||
|
||||
if [[ "$ENABLE_SWAP" == "true" ]]; then
|
||||
echo "swap already enabled"
|
||||
else
|
||||
swap_enable
|
||||
fi
|
||||
|
||||
if [[ "$RTSP_PASSWORD" = "" ]]; then
|
||||
RTSP_PASSWORD=$(cat /opt/wz_mini/tmp/wlan0_mac)
|
||||
@ -485,12 +467,7 @@ if [[ "$RTSP_LOW_RES_ENABLED" == "true" ]]; then
|
||||
LOW_VIDEO_DEV="/dev/video2"
|
||||
fi
|
||||
|
||||
|
||||
if [[ "$ENABLE_SWAP" == "true" ]]; then
|
||||
echo "swap already enabled"
|
||||
else
|
||||
swap_enable
|
||||
fi
|
||||
|
||||
/opt/wz_mini/bin/cmd video on1
|
||||
|
||||
|
4
file.chk
4
file.chk
@ -3,8 +3,8 @@ d41d8cd98f00b204e9800998ecf8427e SD_ROOT/wz_mini/mnt/.gitignore
|
||||
34c6a4c3a941ff2becd9f487826d7692 SD_ROOT/wz_mini/etc/uvc.config
|
||||
2f637366f34157f1cf66bb141e0b0d77 SD_ROOT/wz_mini/etc/init.d/wz_cam.sh
|
||||
b4a1aa209ea23dccd908a67e7d603f31 SD_ROOT/wz_mini/etc/init.d/v3_init.sh
|
||||
0db1f3d0276449ddbe6069db05ed6beb SD_ROOT/wz_mini/etc/init.d/wz_user.sh
|
||||
cddb7d88fe183ecaea71c2fd3d109e9c SD_ROOT/wz_mini/etc/init.d/wz_post.sh
|
||||
9d55cf0a4de134f12b2eb68f45efddd5 SD_ROOT/wz_mini/etc/init.d/wz_user.sh
|
||||
b2d80878024693728305f55dbe76ccc0 SD_ROOT/wz_mini/etc/init.d/wz_post.sh
|
||||
e3034eac02d8eda9902ca9cf89f0a586 SD_ROOT/wz_mini/etc/inittab
|
||||
840aa9c26726201f7cffbf001bee193a SD_ROOT/wz_mini/etc/uvc_jxf22.config
|
||||
2e2d5c1ebdcc16da6852e9cdd3ffc66c SD_ROOT/wz_mini/etc/wz_mini.conf.dist
|
||||
|
Loading…
Reference in New Issue
Block a user