Search
SailfishOS Open Build Service
>
Projects
>
nemo
:
testing:hw
:
ti:omap3:n900
>
nokia-usb-networking
> nokia-usb-networking.sh
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File nokia-usb-networking.sh of Package nokia-usb-networking
#!/bin/bash # Nokia USB Networking RETVAL=0 USB_NET_MODULE=g_nokia function start { /sbin/modprobe $USB_NET_MODULE RETVAL=$? if [ "$RETVAL" = 0 ]; then ifconfig usb0 down ifconfig usb0 192.168.2.15 up RETVAL=$? fi } function stop { lsmod | grep $USB_NET_MODULE &> /dev/null RETVAL=$? if [ "$RETVAL" = 0 ]; then /sbin/ifconfig usb0 down /sbin/modprobe -r $USB_NET_MODULE $RETVAL=$? else $RETVAL=0 fi } case "$1" in start) start ;; stop) stop ;; *) echo "Usage: $0 {start|stop}" RETVAL=1 esac exit $RETVAL