Skip to content

Commit 7d0dee8

Browse files
committed
Update License years and ensure udhcpc is restarted when hostname changes
1 parent ffc544f commit 7d0dee8

File tree

4 files changed

+10
-5
lines changed

4 files changed

+10
-5
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2015 Alexander Williams, Unscramble <license@unscramble.jp>
3+
Copyright (c) 2015-2016 Alexander Williams, Unscramble <license@unscramble.jp>
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

network.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# TinyCore static/dhcp networking
44
#
55
# MIT License
6-
# Copyright (c) 2015 Alexander Williams, Unscramble <license@unscramble.jp>
6+
# Copyright (c) 2015-2016 Alexander Williams, Unscramble <license@unscramble.jp>
77

88
set -a
99

network_dhcp.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,13 @@
33
# TinyCore static/dhcp networking
44
#
55
# MIT License
6-
# Copyright (c) 2015 Alexander Williams, Unscramble <license@unscramble.jp>
6+
# Copyright (c) 2015-2016 Alexander Williams, Unscramble <license@unscramble.jp>
77

88
pid="/var/run/udhcpc.${interface}.pid"
99

10+
if [ -f "$pid" ]; then
11+
kill `cat $pid`
12+
fi
13+
1014
/opt/udhcpc.script deconfig
11-
/sbin/udhcpc -b -i $interface -h $(/bin/hostname) -p $pid -s /opt/udhcpc.script >/dev/null 2>&1 &
15+
/sbin/udhcpc -b -i $interface -x hostname:$(/bin/hostname) -p $pid -s /opt/udhcpc.script >/dev/null 2>&1 &

network_static.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# TinyCore static/dhcp networking
44
#
55
# MIT License
6-
# Copyright (c) 2015 Alexander Williams, Unscramble <license@unscramble.jp>
6+
# Copyright (c) 2015-2016 Alexander Williams, Unscramble <license@unscramble.jp>
77

88
pid="/var/run/udhcpc.${interface}.pid"
99

@@ -12,4 +12,5 @@ if [ -f "$pid" ]; then
1212
kill `cat $pid`
1313
fi
1414

15+
/opt/udhcpc.script deconfig
1516
/opt/udhcpc.script renew

0 commit comments

Comments
 (0)