Monorepo for Aesthetic.Computer aesthetic.computer
4
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: shutdown animation + curl in initramfs

- system.poweroff() now signals main loop to run bye animation
instead of calling _exit(0) directly
- Add curl binary + libs to initramfs for HTTP fetches
- Add busybox wget as fallback

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

+17 -15
+11
fedac/native/docker-build.sh
··· 129 129 done 130 130 # udhcpc also expected at /sbin/ by wifi.c 131 131 ln -sf ../bin/busybox "$IROOT/sbin/udhcpc" 2>/dev/null || true 132 + 133 + # ── 2a2: curl + wget for HTTP fetches (captive portals, OTA, API calls) ── 134 + CURL_BIN=$(command -v curl) 135 + if [ -n "$CURL_BIN" ]; then 136 + cp "$CURL_BIN" "$IROOT/bin/curl" 137 + for lib in $(ldd "$CURL_BIN" 2>/dev/null | grep -oP '/\S+'); do 138 + [ -f "$lib" ] && cp -nL "$lib" "$IROOT/lib64/" 2>/dev/null || true 139 + done 140 + fi 141 + # busybox wget as fallback 142 + ln -s busybox "$IROOT/bin/wget" 2>/dev/null || true 132 143 # Minimal udhcpc script to configure interface after getting lease 133 144 mkdir -p "$IROOT/usr/share/udhcpc" 134 145 cat > "$IROOT/usr/share/udhcpc/default.script" << 'UDHCPC_SCRIPT'
+2 -1
fedac/native/src/ac-native.c
··· 2893 2893 } 2894 2894 } 2895 2895 2896 - if (power_pressed) { 2896 + if (power_pressed || poweroff_requested) { 2897 + poweroff_requested = 0; // consume the flag 2897 2898 // Say bye IMMEDIATELY (TTS + shutdown chime start before animation) 2898 2899 char bye_title[80]; 2899 2900 {
+4 -14
fedac/native/src/js-bindings.c
··· 3322 3322 return JS_UNDEFINED; 3323 3323 } 3324 3324 3325 - // system.poweroff() — clean shutdown (power off) 3325 + // system.poweroff() — signal main loop to run shutdown animation then exit 3326 + extern volatile int poweroff_requested; 3326 3327 static JSValue js_poweroff(JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv) { 3327 3328 (void)ctx; (void)this_val; (void)argc; (void)argv; 3328 - ac_log("[system] poweroff requested"); 3329 - perf_flush(); 3330 - if (current_rt && current_rt->audio) { 3331 - audio_shutdown_sound(current_rt->audio); 3332 - usleep(500000); 3333 - } 3334 - ac_log("[poweroff] pid=%d, syncing filesystems...\n", getpid()); 3335 - ac_log_flush(); 3336 - sync(); usleep(300000); sync(); 3337 - ac_log("[poweroff] exiting with code 0 (init will power off)...\n"); 3338 - ac_log_flush(); 3339 - // Exit cleanly — init script sees exit code 0 and runs poweroff 3340 - _exit(0); 3329 + ac_log("[system] poweroff requested via JS"); 3330 + poweroff_requested = 1; // main loop will run bye animation + exit(0) 3341 3331 return JS_UNDEFINED; 3342 3332 } 3343 3333