Tiny Core Extensions > TCE Q&A Forum

lldpd not available for 16.x

<< < (3/6) > >>

Rich:
Hi orneh24

--- Quote from: orneh24 on August 22, 2025, 06:28:41 PM --- ... I believe the only thing missing now, is the init.d/lldpd ...
--- End quote ---
I'll look into that.


--- Quote --- ... and making the lldpd package installation persistent (or rather, what would be the correct way, of making it persistent after building it locally)?
--- End quote ---
I'm assuming you used the build script, so copy lldpd.tcz, lldpd.tcz.dep, and lldpd.tcz.md5.txt
to your  tce/optional directory.

Make sure  lldpd.tcz  is listed in  onboot.lst.

If you followed these instructions:

--- Quote from: Rich on August 22, 2025, 02:40:06 PM --- ...
--- Code: ---echo "etc/group" >> /opt/.filetool.lst
echo "etc/gshadow" >> /opt/.filetool.lst
echo "etc/passwd" >> /opt/.filetool.lst
echo "etc/shadow" >> /opt/.filetool.lst
echo "etc/sudoers" >> /opt/.filetool.lst
filetool.sh -b
--- End code ---

--- End quote ---
then the added  _lldpd  user and group will survive a reboot.

orneh24:
ref. persistency - copied lldpd.tcz, .tcz.dep and .tcz.md5.txt to /mnt/sda1/tce/optional and added lldpd to onboot.lst.

Currently trying to understand how TCL handles init.d - are the files in /usr/local/etc/init.d/ just symlinks to /tmp/tcloop/ ? I tried taking a look at the Wiki, but couldn't quite find the info.

--- Code: ---tc@nginxsnmptcl:/usr/local/etc/init.d$ ll
total 0
lrwxrwxrwx    1 root     root            42 Aug 23 00:09 fuse -> /tmp/tcloop/fuse/usr/local/etc/init.d/fuse
lrwxrwxrwx    1 root     root            44 Aug 23 00:09 nginx -> /tmp/tcloop/nginx/usr/local/etc/init.d/nginx
lrwxrwxrwx    1 root     root            60 Aug 23 00:09 open-vm-tools -> /tmp/tcloop/open-vm-tools/usr/local/etc/init.d/open-vm-tools
lrwxrwxrwx    1 root     root            48 Aug 23 00:09 openssh -> /tmp/tcloop/openssh/usr/local/etc/init.d/openssh

--- End code ---

Edit; sorry Rich, didn't see your reply before posting this one. Yes, I did indeed also add the group, gshadow, passwd, shadow and sudoers file to .filetool.lst.

Rich:
Hi orneh24

--- Quote from: orneh24 on August 22, 2025, 08:17:03 PM --- ... are the files in /usr/local/etc/init.d/ just symlinks to /tmp/tcloop/ ? ...
--- End quote ---
Yes, they are.

Extensions are read-only file systems that get mounted under /tmp/tcloop/.
Their contents then get symlinked into the system directories.

patrikg:
Hi @orneh24.
If you want, you can also make a script that will add the user and group when the user installing the extension.
Se this wiki page how to do it.
https://wiki.tinycorelinux.net/doku.php?id=wiki:creating_extensions#adding_custom_startup_scripts

Rich:
Hi orneh24
Sorry for the delay. I started by trying to modify an existing
init.d/lldpd  script from another distro. It proved to be too
complicated, so I adapted our  init.d/dbus  script:

--- Code: ---#!/bin/sh

NAME=lldpd
DAEMON="/usr/local/sbin/$NAME"
DAEMON_ARGS=""


start()
{
start-stop-daemon -S -x "$DAEMON" -- "$DAEMON_ARGS"
}

stop()
{
start-stop-daemon -K -x "$DAEMON" 2>/dev/null
rm -rf /var/run/"$NAME"*
}



status()
{
if [ -e /var/run/"$NAME".pid ]; then
echo -e "\n$NAME is running.\n"
exit 0
else
echo -e "\n$NAME is not running.\n"
exit 1
fi
}

case $1 in
start) start
;;
stop) stop
;;
status) status
;;
restart) stop; start
;;
*) echo -e "\n$0 [start|stop|restart|status]\n"
;;
esac
--- End code ---

Under  stop() , I've included a command to remove all lldpd
files and directories in case lldpd does not clean up after
itself when stopped:

--- Code: ---drwxr-xr-x    2 root     root            40 Aug 22 22:02 lldpd/
-rw-r--r--    1 root     root             5 Aug 22 22:07 lldpd.pid
srwxrwx---    1 _lldpd   _lldpd           0 Aug 22 22:07 lldpd.socket
-rwxrwx---    1 _lldpd   _lldpd           0 Aug 22 22:07 lldpd.socket.lock
--- End code ---

Attachment deleted. See next post.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version