mirror of
https://github.com/kernelkit/infix.git
synced 2026-07-31 13:03:02 +02:00
board/common: allow default auth:none restconf via nginx to clixon
- Only disable default services we don't need, prevents touching services mid-air in runlevel S. Allow nginx now as well - Enable fcgi based RESTCONF interface via nginx by default - Enable auth:none for customer demo Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
@@ -5,10 +5,19 @@
|
||||
|
||||
# This is a managed node, ignore all default configuration...
|
||||
rm -f /etc/rc.local
|
||||
rm -rf /etc/finit.d/enabled/*.conf
|
||||
rm -rf /etc/network/interfaces*
|
||||
|
||||
#...except for some core services
|
||||
for svc in clixon getty sysklogd; do
|
||||
ln -s ../available/$svc.conf /etc/finit.d/enabled/$svc.conf
|
||||
reserved()
|
||||
{
|
||||
for svc in clixon getty nginx sysklogd; do
|
||||
[ "$1" = "${svc}.conf" ] && return 0
|
||||
done
|
||||
|
||||
return 1
|
||||
}
|
||||
|
||||
for file in /etc/finit.d/enabled/*.conf; do
|
||||
reserved "$(basename "$file")" && continue
|
||||
rm "$file"
|
||||
done
|
||||
|
||||
@@ -1,9 +1,19 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
# TODO: Copy in a proper factory config from
|
||||
# /usr/share/vendor/<hardware-id>_db or similar.
|
||||
touch /mnt/tmp/infix/db/factory_db
|
||||
FACTORY=/mnt/tmp/infix/db/factory_db
|
||||
|
||||
[ -f /cfg/startup_db ] || cp /mnt/tmp/infix/db/factory_db /cfg/startup_db
|
||||
# TODO: Maybe copy in a proper factory config from
|
||||
# /usr/share/vendor/<hardware-id>_db or similar.
|
||||
# Right now we generate one from probed data.
|
||||
cat <<EOF >$FACTORY
|
||||
<config>
|
||||
<restconf xmlns="http://clicon.org/restconf">
|
||||
<enable>true</enable>
|
||||
<auth-type>none</auth-type>
|
||||
<fcgi-socket>/run/clixon/restconf.sock</fcgi-socket>
|
||||
</restconf>
|
||||
</config>
|
||||
EOF
|
||||
|
||||
[ -f /cfg/startup_db ] || cp "$FACTORY" /cfg/startup_db
|
||||
|
||||
Reference in New Issue
Block a user