Matteo Bernardini wrote on 07/22/2020 07:23 AM:
Il giorno mer 22 lug 2020 alle ore 13:04 Tim Dickson via
SlackBuilds-users <slackbuilds-users@slackbuilds.org> ha scritto:

hi all, I'm creating a slackbuild for wsdd2. this provides device and
samba share browsing when netbios is not used.
As this includes ip6, it is pretty essential in a lan unless you disable
ip6 on all the windows clients, as it allows autodiscovery. (you do need
to make sure you allow ip6 addresses in smb.conf as well)

There isn't an rc.wsdd2 file with the source, so I was thinking of
creating one. What I am not sure is the preferred way of adding it to
rc.M and rc.K or similar in the doinst.sh
It would be nice if the package was activated when it was installed. It
could always be de-activated by removing the executable bit from it's rc
file.
i could grep for it, and if not there, then add it, but that doesn't
handle removing it if someone removes the package.

I was surprised it hadn't been added to samba already, but looking at
the samba mailing list, it has been sitting around but not added for 4
years. assuming it does eventually get added, then there will be no need
for a separate package, but until that time, it is pretty essential with
windows 10 these days.

are there recommended ways of adding rc files so that they are run on
startup. ?
thanks, Tim
regards, Tim

silently modifying Slackware startup scripts in the doinst.sh isn't
allowed (as it's considered dangerous) but you can add a note to the
README with details on the modificatiions to apply: here is an example

https://slackbuilds.org/slackbuilds/14.2/system/lxdm/README.SLACKWARE

Matteo
_______________________________________________
SlackBuilds-users mailing list
SlackBuilds-users@slackbuilds.org
https://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users
Archives - https://lists.slackbuilds.org/pipermail/slackbuilds-users/
FAQ - https://slackbuilds.org/faq/


Tim,

  Create the rc.wsdd2 and then document something that says to active the 
program add the following lines to the /etc/rc.d/rc.local file:

  if [ -x /etc/rc.d/rc.wsdd2 ] ; then
          /etc/rc.d/rc.wsdd2 start
  fi

The rc.local file is for local things to be done at startup.  Then indicate 
that the following lines should be added to the /etc/rc.d/rc.local_shutdown 
file:

  if [ -x /etc/rc.d/rc.wsdd2 ] ; then
          /etc/rc.d/rc.wsdd2 stop
  fi

  Obviously, the rc.wsdd2 script would need to support a "start" and "stop" option. You should 
probably also support a "restart" and "status" in the rc.wsdd2 script.

  The rc.local_shutdown file is for local things to be done at shutdown. It 
does not exist by default.

   The rc.local and rc.local_shutdown scripts are invoked from the rc.M and 
rc.6/rc.0 scripts at the appropriate time.  This is the rc.local file from 
Slackware 14.2:

  #!/bin/sh
  #
  # /etc/rc.d/rc.local:  Local system initialization script.
  #
  # Put any local startup commands in here.  Also, if you have
  # anything that needs to be run at shutdown time you can
  # make an /etc/rc.d/rc.local_shutdown script and put those
  # commands in there.

  As Matteo pointed out you do not want to make changes to the /etc/rc.d/rc.M 
or the /etc/rc.d/rc.S  files.  Documents the needed changes in the appropriate 
README file.

  Don

_______________________________________________
SlackBuilds-users mailing list
SlackBuilds-users@slackbuilds.org
https://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users
Archives - https://lists.slackbuilds.org/pipermail/slackbuilds-users/
FAQ - https://slackbuilds.org/faq/

Reply via email to