diff options
Diffstat (limited to 'target/device/valka/target_skeleton')
-rwxr-xr-x | target/device/valka/target_skeleton/etc/default/rc.conf | 16 | ||||
-rw-r--r-- | target/device/valka/target_skeleton/etc/lighttpd.conf | 25 | ||||
-rw-r--r-- | target/device/valka/target_skeleton/etc/ntp.conf | 4 | ||||
-rwxr-xr-x | target/device/valka/target_skeleton/etc/rc.d/dbus | 30 | ||||
-rwxr-xr-x | target/device/valka/target_skeleton/etc/rc.d/gui | 39 | ||||
-rwxr-xr-x | target/device/valka/target_skeleton/etc/rc.d/nbd_swap | 31 | ||||
-rw-r--r-- | target/device/valka/target_skeleton/etc/shadow | 4 | ||||
-rw-r--r-- | target/device/valka/target_skeleton/etc/shells | 3 | ||||
-rw-r--r-- | target/device/valka/target_skeleton/valka/web/.empty (renamed from target/device/valka/target_skeleton/web/.empty) | 0 |
9 files changed, 69 insertions, 83 deletions
diff --git a/target/device/valka/target_skeleton/etc/default/rc.conf b/target/device/valka/target_skeleton/etc/default/rc.conf index c82c944c7..01b9b54a6 100755 --- a/target/device/valka/target_skeleton/etc/default/rc.conf +++ b/target/device/valka/target_skeleton/etc/default/rc.conf @@ -67,14 +67,16 @@ ln_program="/bin/ln" killall_program="/usr/bin/killall" modules_enable="YES" -### Misc GUI stuff ################################## -gui_enable="yes" -xorg_program="/usr/bin/Xfbdev" -xorg_flags="" -xorg_log="/var/log/Xorg.log" - ### Lighttpd ######################################## lighttpd_enable="YES" -lighttpd_program="/usr/bin/lighttpd" +lighttpd_program="/usr/sbin/lighttpd" lighttpd_flags="-f /etc/lighttpd.conf" lighttpd_pidfile="/var/run/lighttpd.pid" + +### nbd swap ######################################## +nbd_swap_eanble="NO" +nbd_swap_device="/dev/nd0" +nbd_swap_server="192.168.1.1" +nbd_swap_port="1234" +nbd_swap_program="/sbin/nbd-client" +nbd_swap_pidfile="/var/run/nbd_swap.pid" diff --git a/target/device/valka/target_skeleton/etc/lighttpd.conf b/target/device/valka/target_skeleton/etc/lighttpd.conf new file mode 100644 index 000000000..14e28ed6f --- /dev/null +++ b/target/device/valka/target_skeleton/etc/lighttpd.conf @@ -0,0 +1,25 @@ +server.document-root = "/valka/web" +server.port = 80 +server.username = "valka" +server.groupname = "valka" + +index-file.names = ( "index.php", "index.html" ) +mimetype.assign = ( + ".html" => "text/html", + ".txt" => "text/plain", + ".js" => "text/css", + ".jpg" => "image/jpeg", + ".png" => "image/png" +) + +server.modules = ( + "mod_fastcgi", + "mod_rewrite" +) + +fastcgi.server = ( + ".php" => (( + "bin-path" => "/usr/bin/php-cgi", + "socket" => "/tmp/php.socket" + )) +) diff --git a/target/device/valka/target_skeleton/etc/ntp.conf b/target/device/valka/target_skeleton/etc/ntp.conf index 86135a35c..bc8a8d91e 100644 --- a/target/device/valka/target_skeleton/etc/ntp.conf +++ b/target/device/valka/target_skeleton/etc/ntp.conf @@ -1,6 +1,6 @@ # /etc/ntp.conf, configuration for ntpd -driftfile /var/lib/ntp/ntp.drift -statsdir /var/log/ +driftfile /var/db/ntp.drift +statsdir /var/log server 0.pool.ntp.org server 1.pool.ntp.org diff --git a/target/device/valka/target_skeleton/etc/rc.d/dbus b/target/device/valka/target_skeleton/etc/rc.d/dbus deleted file mode 100755 index 4b81d3c38..000000000 --- a/target/device/valka/target_skeleton/etc/rc.d/dbus +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/sh -. /etc/rc.subr - -start() { - [ -x /usr/bin/dbus-daemon ] || exit 0 - [ -d /var/run/dbus ] || mkdir -p /var/run/dbus - [ -d /var/lock/subsys ] || mkdir -p /var/lock/subsys - - echo -n " * Starting dbus: " - - dbus-uuidgen --ensure - dbus-daemon --system - RETVAL=$? - echo "Ok" - [ $RETVAL -eq 0 ] && touch /var/lock/subsys/dbus-daemon -} - -stop() { - echo -n " * Stopping dbus: " - - killall dbus-daemon - RETVAL=$? - echo "Ok" - if [ $RETVAL -eq 0 ]; then - rm -f /var/lock/subsys/dbus-daemon - rm -f /var/run/messagebus.pid - fi -} - -rc_run_command "$1" "dbus" diff --git a/target/device/valka/target_skeleton/etc/rc.d/gui b/target/device/valka/target_skeleton/etc/rc.d/gui deleted file mode 100755 index 494d11377..000000000 --- a/target/device/valka/target_skeleton/etc/rc.d/gui +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh -. /etc/rc.subr - -firsttime() { - if [ -e /var/db/gui.done ]; then - return 0 - fi - echo -n " * Running fc-cache: " - /usr/bin/fc-cache -v > /dev/null - echo "Ok" - - echo -n " * Querying PANGO modules: " - /usr/bin/pango-querymodules > /etc/pango/pango.modules - echo "Ok" - - echo -n " * Querying GTK Modules: " - /usr/bin/gtk-query-immodules-2.0 > /etc/gtk-2.0/gtk.immodules - echo "Ok" - - echo -n " * Querying Pixbuf loaders: " - /usr/bin/gdk-pixbuf-query-loaders > /etc/gtk-2.0/gdk-pixbuf.loaders - echo "Ok" - - touch /var/db/gui.done -} - -start() { - firsttime - - echo -n " * Starting XOrg: " - ${xorg_program} ${xorg_flags} > ${xorg_log} 2>&1 & - echo "Ok" -} - -stop() { - return 0 -} - -rc_run_command "$1" "gui" diff --git a/target/device/valka/target_skeleton/etc/rc.d/nbd_swap b/target/device/valka/target_skeleton/etc/rc.d/nbd_swap new file mode 100755 index 000000000..b2a4a9c25 --- /dev/null +++ b/target/device/valka/target_skeleton/etc/rc.d/nbd_swap @@ -0,0 +1,31 @@ +#!/bin/ash +. /etc/rc.subr + +start() { + echo -n " * Starting nbd swap: " + if [ ! -x ${nbd_swap_program} ]; then + log_error "Missing 'nbd_client' program (${nbd_swap_program})" + echo "Failed" + return 1 + fi + + mknod ${nbd_swap_device} b 43 0 + ${nbd_swap_program} ${nbd_swap_server} ${nbd_swap_port} ${nbd_swap_device} & + pid=$! + if [ "$?" -eq 0 ]; then + echo "${pid}" > ${nbd_swap_pidfile} + mkswap ${nbd_swap_device} + swapon ${nbd_swap_device} + echo "Ok" + else + echo "Failed" + fi +} + +stop() { + echo " * Stopping nbd swap..." + swapoff ${nbd_swap_device} + killpid ${nbd_swap_pidfile} +} + +rc_run_command "$1" "nbd_swap" diff --git a/target/device/valka/target_skeleton/etc/shadow b/target/device/valka/target_skeleton/etc/shadow index 85bbfeefe..0dc1107a3 100644 --- a/target/device/valka/target_skeleton/etc/shadow +++ b/target/device/valka/target_skeleton/etc/shadow @@ -1,4 +1,4 @@ -root:$1$3P2nFqtv$yuwcUwEGBusYZtAOvzOrF/:13200:0:99999:7::: +root::13200:0:99999:7::: dbus:!:13200:0:99999:7::: -valka:$1$rDBo1uCh$EVSlBaeBgyHiSpZpShyW./:0:0:99999:7::: +valka::0:0:99999:7::: nobody:!:13200:0:99999:7::: diff --git a/target/device/valka/target_skeleton/etc/shells b/target/device/valka/target_skeleton/etc/shells index 6ee110ced..32bd740dc 100644 --- a/target/device/valka/target_skeleton/etc/shells +++ b/target/device/valka/target_skeleton/etc/shells @@ -1,8 +1,5 @@ # /etc/shells: valid login shells /bin/ash /bin/sh -/bin/zsh /bin/bash -/usr/bin/zsh -/usr/bin/bash /usr/bin/screen diff --git a/target/device/valka/target_skeleton/web/.empty b/target/device/valka/target_skeleton/valka/web/.empty index e69de29bb..e69de29bb 100644 --- a/target/device/valka/target_skeleton/web/.empty +++ b/target/device/valka/target_skeleton/valka/web/.empty |