Tiny Core Extensions > TCE Q&A Forum

lldpd not available for 16.x

<< < (6/6)

Rich:
Hi orneh24
I created a couple of scripts to make using lldpd easier.

lldpdAddUser  adds  _lldpd  to users and groups if not already present:

--- Code: ---#!/bin/sh
# lldpd needs to be added to users and groups to run.

# If group  _lldpd  does not exist, create it.
if ! sudo grep -q "_lldpd" /etc/group; then sudo addgroup _lldpd; fi

# If user  _lldpd  does not exist, create it.
if ! sudo grep -q "_lldpd" /etc/passwd; then sudo adduser -H -S -s /bin/sh -G _lldpd -D _lldpd; fi

# If  _lldpd  is not in sudoers, add it.
if ! sudo grep -q "_lldpd" /etc/sudoers
then
echo -e "_lldpd\tALL=NOPASSWD: ALL" | sudo tee -a /etc/sudoers > /dev/null
fi
--- End code ---

lldpdBackupUser  adds the updated user/group files to  .filetool.lst  if
they are not already present:

--- Code: ---#!/bin/sh
# Updates /opt/.filetool.lst.

FILETOOL_LST="/opt/.filetool.lst"

# List of files to add to  .filetool.lst.
FILES="etc/passwd etc/shadow etc/sudoers etc/group etc/gshadow"

# Go through the list of FILES one by one.
for FILE in $FILES
do
# See if FILE is already in  .filetool.lst.
if ! grep -q $FILE $FILETOOL_LST 2> /dev/null
then
# If not, then add it.
echo $FILE >> $FILETOOL_LST
fi
done

echo "Run filetool.sh -b to backup updated files"
--- End code ---
I leave running the actual backup to the end user but provide a reminder
that it needs to be done.

I plan on adding them to the build package for inclusion with the extension.

I've attached copies of the scripts to this post.

Rich:
Hi orneh24
I've created lldpd.tcz, lldpd-dev.tcz, and lldpd-doc.tcz for both x86 and x86_64
and added them to the TC16 repository.

It has been updated to version 1.0.19 and both xml and snmp have been enabled.

The current source files are here:
http://tinycorelinux.net/16.x/x86/tcz/src/lldpd/

The .info has been updated mention the three scripts added to the extension:
http://tinycorelinux.net/16.x/x86/tcz/lldpd.tcz.info

Navigation

[0] Message Index

[*] Previous page

Go to full version