freewrt_1_0
freewrt_2_0
| Line | |
|---|
| 1 | #!/bin/sh
|
|---|
| 2 | . $IPKG_INSTROOT/etc/functions.sh
|
|---|
| 3 |
|
|---|
| 4 | # do not change below
|
|---|
| 5 | # check if we are on real system
|
|---|
| 6 | if [ -z "${IPKG_INSTROOT}" ]; then
|
|---|
| 7 | # create copies of passwd and group, if we use squashfs
|
|---|
| 8 | rootfs=`mount |awk '/root/ { print $5 }'`
|
|---|
| 9 | if [ "$rootfs" = "squashfs" ]; then
|
|---|
| 10 | if [ -h /etc/group ]; then
|
|---|
| 11 | rm /etc/group
|
|---|
| 12 | cp -p /rom/etc/group /etc/group
|
|---|
| 13 | fi
|
|---|
| 14 | if [ -h /etc/passwd ]; then
|
|---|
| 15 | rm /etc/passwd
|
|---|
| 16 | cp -p /rom/etc/passwd /etc/passwd
|
|---|
| 17 | fi
|
|---|
| 18 | fi
|
|---|
| 19 | fi
|
|---|
| 20 |
|
|---|
| 21 | gid=$(get_next_gid)
|
|---|
| 22 | add_group ntp $gid
|
|---|
| 23 | add_user ntp $(get_next_uid) $gid /tmp/.ntp
|
|---|
| 24 | add_service ntp 123/udp
|
|---|
| 25 | add_rcconf openntpd ntpd_flags -s
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.