add samples

This commit is contained in:
Mario Fetka
2026-04-19 23:08:28 +02:00
parent 22dcfb823b
commit a1490efb03
8 changed files with 458 additions and 136 deletions

View File

@@ -0,0 +1,50 @@
#!/bin/sh
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# IPX stop helper for systemd and OpenRC.
#
# This script disables automatic IPX behaviour, removes configured static
# routes, removes all configured IPX interfaces and deletes the internal IPX
# network if present.
set -u
retval=0
oldifs=${IFS}
IFS='
'
for entry in ${IPX_ROUTES:-}; do
[ -n "${entry}" ] || continue
case "${entry}" in
\#*)
continue
;;
esac
target=${entry%%:*}
if ! /sbin/ipx_route del "${target}"; then
printf '%s\n' "ipx: failed to remove route to ${target}" >&2
retval=1
fi
done
IFS=${oldifs}
if ! /sbin/ipx_configure --auto_primary=off --auto_interface=off; then
printf '%s\n' "ipx: failed to disable automatic IPX configuration" >&2
retval=1
fi
if ! /sbin/ipx_interface delall; then
printf '%s\n' "ipx: failed to remove IPX interfaces" >&2
retval=1
fi
if ! /sbin/ipx_internal_net del; then
:
fi
exit "${retval}"