This commit is contained in:
Ing 2023-06-23 16:29:10 +08:00
parent b1a76cc7f4
commit ad528f0de2
6 changed files with 48 additions and 48 deletions

View File

@ -10,24 +10,25 @@ PIDFILE=/var/run/dhcpcd/pid
[ -f $CONFIG ] || exit 0 [ -f $CONFIG ] || exit 0
case "$1" in case "$1" in
start) start)
echo "Starting dhcpcd..." echo "Starting dhcpcd..."
start-stop-daemon -S -x "$DAEMON" -p "$PIDFILE" -- -f "$CONFIG" start-stop-daemon -S -x "$DAEMON" -p "$PIDFILE" -- -f "$CONFIG"
;; ;;
stop) stop)
echo "Stopping dhcpcd..." echo "Stopping dhcpcd..."
start-stop-daemon -K -x "$DAEMON" -p "$PIDFILE" -o start-stop-daemon -K -x "$DAEMON" -p "$PIDFILE" -o
;; ;;
reload|force-reload) reload | force-reload)
echo "Reloading dhcpcd configuration..." echo "Reloading dhcpcd configuration..."
"$DAEMON" -s reload "$DAEMON" -s reload
;; ;;
restart) restart)
"$0" stop "$0" stop
sleep 1 # Prevent race condition: ensure dhcpcd stops before start. sleep 1 # Prevent race condition: ensure dhcpcd stops before start.
"$0" start "$0" start
;; ;;
*) *)
echo "Usage: $0 {start|stop|restart|reload|force-reload}" echo "Usage: $0 {start|stop|restart|reload|force-reload}"
exit 1 exit 1
;;
esac esac

View File

@ -1,20 +1,20 @@
[global] [global]
workgroup = WORKGROUP workgroup = WORKGROUP
server role = standalone server server role = standalone server
obey pam restrictions = yes obey pam restrictions = yes
map to guest = Bad User map to guest = Bad User
usershare allow guests = yes usershare allow guests = yes
dfree command = /usr/bin/df dfree command = /usr/bin/df
[arpl] [arpl]
browseable = yes browseable = yes
public = yes public = yes
path = /mnt path = /mnt
guest ok = yes guest ok = yes
printable = no printable = no
read only = no read only = no
writable = yes writable = yes
create mask = 0600 create mask = 0600
directory mask = 0700 directory mask = 0700
force user = root force user = root
force group = root force group = root

View File

@ -38,7 +38,7 @@ PermitRootLogin yes
# The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2 # The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2
# but this is overridden so installations will only check .ssh/authorized_keys # but this is overridden so installations will only check .ssh/authorized_keys
AuthorizedKeysFile .ssh/authorized_keys AuthorizedKeysFile .ssh/authorized_keys
#AuthorizedPrincipalsFile none #AuthorizedPrincipalsFile none
@ -106,7 +106,7 @@ AuthorizedKeysFile .ssh/authorized_keys
#Banner none #Banner none
# override default of no subsystems # override default of no subsystems
Subsystem sftp /usr/libexec/sftp-server Subsystem sftp /usr/libexec/sftp-server
# Example of overriding settings on a per-user basis # Example of overriding settings on a per-user basis
#Match User anoncvs #Match User anoncvs

View File

@ -16,18 +16,17 @@ PROMPT_COMMAND="history -a;$PROMPT_COMMAND"
export EDITOR="/bin/nano" export EDITOR="/bin/nano"
export BOOTLOADER_PATH="/mnt/p1" export BOOTLOADER_PATH="/mnt/p1"
export SLPART_PATH="/mnt/p2" # Synologic partition export SLPART_PATH="/mnt/p2" # Synologic partition
export CACHE_PATH="/mnt/p3" export CACHE_PATH="/mnt/p3"
export DSMROOT_PATH="/mnt/dsmroot" export DSMROOT_PATH="/mnt/dsmroot"
export PATH="${PATH}:/opt/arpl" export PATH="${PATH}:/opt/arpl"
if [ -f ${BOOTLOADER_PATH}/.locale ]; then if [ -f ${BOOTLOADER_PATH}/.locale ]; then
export LANG="`cat ${BOOTLOADER_PATH}/.locale`" export LANG="$(cat ${BOOTLOADER_PATH}/.locale)"
fi fi
if [ -d /opt/arpl/lang ]; then if [ -d /opt/arpl/lang ]; then
for F in `ls /opt/arpl/lang/*.mo` for F in $(ls /opt/arpl/lang/*.mo); do
do
install "${F}" "/usr/share/locale/$(basename $F .mo)/LC_MESSAGES/arpl.mo" install "${F}" "/usr/share/locale/$(basename $F .mo)/LC_MESSAGES/arpl.mo"
done done
fi fi

View File

@ -10,8 +10,8 @@
# if running bash # if running bash
if [ -n "$BASH_VERSION" ]; then if [ -n "$BASH_VERSION" ]; then
# include .bashrc if it exists # include .bashrc if it exists
if [ -f "$HOME/.bashrc" ]; then if [ -f "$HOME/.bashrc" ]; then
. "$HOME/.bashrc" . "$HOME/.bashrc"
fi fi
fi fi

View File

@ -1,4 +1,4 @@
#!/usr/bin/env ash #!/usr/bin/env bash
function use() { function use() {
echo "Use: ${0} junior|config" echo "Use: ${0} junior|config"