blob: 3cbf72a3cd62ced88b0030d24bbf1ba94dfa5f68 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
#!/bin/sh
IFS=","
day="$(( 3600 * 24 ))"
preferred="$(( $day ))"
valid="$(( $preferred + $day ))"
output=""
write_prefix() {
local prefix=$1
res="$prefix,$preferred,$valid,"
echo ">$res" >> /root/pd_manager.log
output="$output$res\n"
}
read duid iaid
read prefix res1 res2
echo "<$duid $iaid $prefix $res1 $res2" >> /root/pd_manager.log
write_prefix "2001:0470:de6f:1234::/64"
write_prefix "2001:0470:de17:1234::/64"
echo -e -n "$output\n\n"
exit 0
|