This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| if [ -z "$1" ]; then | |
| echo "Specify a interface to check!" >&2 | |
| exit 1 | |
| fi | |
| udhcpc -n -q -s /bin/true -t 1 -i "$1" && echo "Found DHCP server on $1" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| STORAGE_OFFSET=64 | |
| BACKUP_BLOCKS=32704 | |
| save_bl() { | |
| local storage="$1" | |
| local backup="$2" | |
| [ -b "$storage" -o -s "$storage" ] || { | |
| echo "Src $storage is not a block device or is empty!" >&2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| rev="12" | |
| _log(){ | |
| echo "$(date '+%Y-%m-%d %H:%M:%S') - ${streamid} - $1" >> /tmp/ffmpeg.log | |
| } | |
| _log_para(){ | |
| echo "$1" | fold -w 120 | sed "s/^.*$/$(date '+%Y-%m-%d %H:%M:%S') - ${streamid} - = &/" >> /tmp/ffmpeg.log |