Ignore:
Timestamp:
Jul 22, 2006, 6:50:15 PM (19 years ago)
Author:
Thorsten Glaser <tg@…>
Branches:
freewrt_1_0, freewrt_2_0
Children:
0511771
Parents:
621ecb5
Message:
  • base-files: we'll have variables of the style | firewall=NO | ssh=YES and variables of the style | ntpd_flags=-s | ntpd_flags="" | ntpd_flags=NO
  • openntpd: convert to use functions.sh stuff

git-svn-id: svn://www.freewrt.org/trunk/freewrt@369 afb5a338-a214-0410-bd46-81f09a774fd1

File:
1 edited

Legend:

Unmodified
Added
Removed
  • package/openntpd/ipkg/openntpd.postinst

    r621ecb5 rd30e6bd  
    11#!/bin/sh
    2 
    3 name=ntp
    4 id=50
    52
    63# do not change below
     
    2118fi
    2219
    23 echo ""
    24 if [ -z "$(grep ^\\${name}: ${IPKG_INSTROOT}/etc/group)" ]; then
    25         echo "adding group $name to /etc/group"
    26         echo "${name}:x:${id}:" >> ${IPKG_INSTROOT}/etc/group 
    27 fi
    28 
    29 if [ -z "$(grep ^\\${name}: ${IPKG_INSTROOT}/etc/passwd)" ]; then
    30         echo "adding user $name to /etc/passwd"
    31         echo "${name}:x:${id}:${id}:${name}:/tmp/.${name}:/bin/false" >> ${IPKG_INSTROOT}/etc/passwd
    32 fi
    33 
    34 grep -q '^ntp[[:space:]]*123/udp' ${IPKG_INSTROOT}/etc/services 2>/dev/null
    35 [ $? -ne 0 ] && echo "ntp       123/udp" >>${IPKG_INSTROOT}/etc/services
     20gid=$(get_next_gid)
     21add_group ntp $gid
     22add_user ntp $(get_next_uid) $gid /tmp/.ntp
     23add_service ntp 123/udp
     24add_rcconf openntpd ntpd_flags -s
Note: See TracChangeset for help on using the changeset viewer.